fix(router): provide a top-level route segment for injection

This commit is contained in:
vsavkin
2016-05-04 14:40:17 -07:00
parent d00b26d941
commit b8136cc26e
6 changed files with 14 additions and 3 deletions

View File

@ -59,7 +59,7 @@ export class RouterLink implements OnDestroy {
@HostBinding() href: string;
@HostBinding('class.router-link-active') isActive: boolean = false;
constructor(@Optional() private _routeSegment: RouteSegment, private _router: Router) {
constructor(private _routeSegment: RouteSegment, private _router: Router) {
// because auxiliary links take existing primary and auxiliary routes into account,
// we need to update the link whenever params or other routes change.
this._subscription =