1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-28 12:35:40 +01:00

set route with router.navigate

This commit is contained in:
Kyle Spearrin 2018-11-30 10:12:30 -05:00
parent ce659c9a51
commit 39005ad759
2 changed files with 7 additions and 5 deletions

2
jslib

@ -1 +1 @@
Subproject commit 739d308498ab68df3e37772265733c81b27f2cc2
Subproject commit 5609fecbcee6d0608ea28985c31688511e735a59

View File

@ -1,6 +1,5 @@
import { remote } from 'electron';
import { Location } from '@angular/common';
import {
ChangeDetectorRef,
Component,
@ -75,7 +74,7 @@ export class VaultComponent implements OnInit, OnDestroy {
private modal: ModalComponent = null;
constructor(private route: ActivatedRoute, private router: Router, private location: Location,
constructor(private route: ActivatedRoute, private router: Router,
private componentFactoryResolver: ComponentFactoryResolver, private i18nService: I18nService,
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef,
private ngZone: NgZone, private syncService: SyncService, private analytics: Angulartics2,
@ -570,8 +569,11 @@ 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,
});
}
private addCipherWithChangeDetection(type: CipherType = null) {