mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
use router.navigate rather than location
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user