mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-29 07:59:42 +01:00
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 {
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
@ -56,11 +55,10 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
private modal: ModalComponent = null;
|
||||
|
||||
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 componentFactoryResolver: ComponentFactoryResolver, private messagingService: MessagingService,
|
||||
private broadcasterService: BroadcasterService, private ngZone: NgZone,
|
||||
private changeDetectorRef: ChangeDetectorRef) { }
|
||||
private broadcasterService: BroadcasterService, private ngZone: NgZone) { }
|
||||
|
||||
ngOnInit() {
|
||||
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'],
|
||||
{ queryParams: queryParams }).toString();
|
||||
this.location.go(url);
|
||||
this.router.navigate([], {
|
||||
relativeTo: this.route,
|
||||
queryParams: queryParams,
|
||||
replaceUrl: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { Location } from '@angular/common';
|
||||
import {
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
@ -77,13 +76,12 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
private modal: ModalComponent = null;
|
||||
|
||||
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 tokenService: TokenService, private cryptoService: CryptoService,
|
||||
private messagingService: MessagingService, private userService: UserService,
|
||||
private platformUtilsService: PlatformUtilsService, private toasterService: ToasterService,
|
||||
private broadcasterService: BroadcasterService, private ngZone: NgZone,
|
||||
private changeDetectorRef: ChangeDetectorRef) { }
|
||||
private broadcasterService: BroadcasterService, private ngZone: NgZone) { }
|
||||
|
||||
async ngOnInit() {
|
||||
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.location.go(url);
|
||||
this.router.navigate([], {
|
||||
relativeTo: this.route,
|
||||
queryParams: queryParams,
|
||||
replaceUrl: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user