Skip to content

Commit 1c94c32

Browse files
committed
fix(router): child routers should delegate navigation to the root router
There is an e2e tests in the examples/routing app testing this behavior
1 parent d5ace7a commit 1c94c32

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/angular2/src/router/router.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,10 @@ class ChildRouter extends Router {
219219
super(parent._registry, parent._pipeline, parent, hostComponent);
220220
this.parent = parent;
221221
}
222+
223+
224+
navigate(url: string): Promise<any> {
225+
// Delegate navigation to the root router
226+
return this.parent.navigate(url);
227+
}
222228
}

0 commit comments

Comments
 (0)