Skip to content

Commit

Permalink
fix(router): child routers should delegate navigation to the root router
Browse files Browse the repository at this point in the history
There is an e2e tests in the examples/routing app testing this behavior
  • Loading branch information
IgorMinar committed Jul 3, 2015
1 parent d5ace7a commit 1c94c32
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/angular2/src/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,10 @@ class ChildRouter extends Router {
super(parent._registry, parent._pipeline, parent, hostComponent);
this.parent = parent;
}


navigate(url: string): Promise<any> {
// Delegate navigation to the root router
return this.parent.navigate(url);
}
}

0 comments on commit 1c94c32

Please sign in to comment.