fix(router): update current state and url before activating components

This commit is contained in:
vsavkin
2016-07-12 12:28:08 -07:00
parent 6518ff88b2
commit 5cf58971f1
3 changed files with 53 additions and 30 deletions

View File

@ -85,7 +85,7 @@ export class RouterLink {
}
get urlTree(): UrlTree {
return this.router.createUrlTreeUsingFutureUrl(
return this.router.createUrlTree(
this.commands,
{relativeTo: this.route, queryParams: this.queryParams, fragment: this.fragment});
}
@ -148,7 +148,7 @@ export class RouterLinkWithHref implements OnChanges, OnDestroy {
}
private updateTargetUrlAndHref(): void {
this.urlTree = this.router.createUrlTreeUsingFutureUrl(
this.urlTree = this.router.createUrlTree(
this.commands,
{relativeTo: this.route, queryParams: this.queryParams, fragment: this.fragment});