make redirects in initial url be reflected in url bar
This commit is contained in:
parent
1bec1033d1
commit
dd880529ac
1 changed files with 3 additions and 1 deletions
|
@ -35,8 +35,10 @@ export class URLRouter {
|
|||
|
||||
attach() {
|
||||
this._subscription = this._history.subscribe(url => this._applyUrl(url));
|
||||
this._applyUrl(this._history.get());
|
||||
// subscribe to path before applying initial url
|
||||
// so redirects in _applyNavigationPath are reflected in url bar
|
||||
this._pathSubscription = this._navigation.pathObservable.subscribe(path => this._applyNavigationPath(path));
|
||||
this._applyUrl(this._history.get());
|
||||
}
|
||||
|
||||
dispose() {
|
||||
|
|
Reference in a new issue