use router.navigate rather than location
This commit is contained in:
parent
9a99a95b15
commit
dd282383d7
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 2a960da31cda2e0fdc2f891dd6ff835bcb32d074
|
Subproject commit 5609fecbcee6d0608ea28985c31688511e735a59
|
|
@ -1,4 +1,3 @@
|
||||||
import { Location } from '@angular/common';
|
|
||||||
import {
|
import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
|
@ -56,11 +55,10 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
private modal: ModalComponent = null;
|
private modal: ModalComponent = null;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private userService: UserService,
|
constructor(private route: ActivatedRoute, private userService: UserService,
|
||||||
private location: Location, private router: Router,
|
private router: Router, private changeDetectorRef: ChangeDetectorRef,
|
||||||
private syncService: SyncService, private i18nService: I18nService,
|
private syncService: SyncService, private i18nService: I18nService,
|
||||||
private componentFactoryResolver: ComponentFactoryResolver, private messagingService: MessagingService,
|
private componentFactoryResolver: ComponentFactoryResolver, private messagingService: MessagingService,
|
||||||
private broadcasterService: BroadcasterService, private ngZone: NgZone,
|
private broadcasterService: BroadcasterService, private ngZone: NgZone) { }
|
||||||
private changeDetectorRef: ChangeDetectorRef) { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.parent.params.subscribe(async (params) => {
|
this.route.parent.params.subscribe(async (params) => {
|
||||||
|
@ -295,8 +293,10 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = this.router.createUrlTree(['organizations', this.organization.id, 'vault'],
|
this.router.navigate([], {
|
||||||
{ queryParams: queryParams }).toString();
|
relativeTo: this.route,
|
||||||
this.location.go(url);
|
queryParams: queryParams,
|
||||||
|
replaceUrl: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { Location } from '@angular/common';
|
|
||||||
import {
|
import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
|
@ -77,13 +76,12 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
private modal: ModalComponent = null;
|
private modal: ModalComponent = null;
|
||||||
|
|
||||||
constructor(private syncService: SyncService, private route: ActivatedRoute,
|
constructor(private syncService: SyncService, private route: ActivatedRoute,
|
||||||
private router: Router, private location: Location,
|
private router: Router, private changeDetectorRef: ChangeDetectorRef,
|
||||||
private i18nService: I18nService, private componentFactoryResolver: ComponentFactoryResolver,
|
private i18nService: I18nService, private componentFactoryResolver: ComponentFactoryResolver,
|
||||||
private tokenService: TokenService, private cryptoService: CryptoService,
|
private tokenService: TokenService, private cryptoService: CryptoService,
|
||||||
private messagingService: MessagingService, private userService: UserService,
|
private messagingService: MessagingService, private userService: UserService,
|
||||||
private platformUtilsService: PlatformUtilsService, private toasterService: ToasterService,
|
private platformUtilsService: PlatformUtilsService, private toasterService: ToasterService,
|
||||||
private broadcasterService: BroadcasterService, private ngZone: NgZone,
|
private broadcasterService: BroadcasterService, private ngZone: NgZone) { }
|
||||||
private changeDetectorRef: ChangeDetectorRef) { }
|
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
||||||
|
@ -480,7 +478,10 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = this.router.createUrlTree(['vault'], { queryParams: queryParams }).toString();
|
this.router.navigate([], {
|
||||||
this.location.go(url);
|
relativeTo: this.route,
|
||||||
|
queryParams: queryParams,
|
||||||
|
replaceUrl: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue