fix(router): fix CanActivate redirect to the root on initial load (#13929)

Closes #13530

PR Close #13929
This commit is contained in:
Dzmitry Shylovich
2017-01-14 22:56:08 +03:00
committed by Miško Hevery
parent 029f558d45
commit e075b1ba83
2 changed files with 30 additions and 1 deletions

View File

@ -757,8 +757,8 @@ export class Router {
})
.then(
() => {
this.navigated = true;
if (navigationIsSuccessful) {
this.navigated = true;
this.routerEvents.next(new NavigationEnd(
id, this.serializeUrl(url), this.serializeUrl(this.currentUrlTree)));
resolvePromise(true);