mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
set route with router.navigate
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 739d308498...5609fecbce
@@ -1,6 +1,5 @@
|
|||||||
import { remote } from 'electron';
|
import { remote } from 'electron';
|
||||||
|
|
||||||
import { Location } from '@angular/common';
|
|
||||||
import {
|
import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
@@ -75,7 +74,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
private modal: ModalComponent = null;
|
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 componentFactoryResolver: ComponentFactoryResolver, private i18nService: I18nService,
|
||||||
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef,
|
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef,
|
||||||
private ngZone: NgZone, private syncService: SyncService, private analytics: Angulartics2,
|
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.router.navigate([], {
|
||||||
this.location.go(url);
|
relativeTo: this.route,
|
||||||
|
queryParams: queryParams,
|
||||||
|
replaceUrl: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private addCipherWithChangeDetection(type: CipherType = null) {
|
private addCipherWithChangeDetection(type: CipherType = null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user