diff --git a/modules/@angular/router/src/router_state.ts b/modules/@angular/router/src/router_state.ts index 540a01e336..553da3136e 100644 --- a/modules/@angular/router/src/router_state.ts +++ b/modules/@angular/router/src/router_state.ts @@ -105,6 +105,8 @@ export class ActivatedRoute { this._futureSnapshot = futureSnapshot; } + get routeConfig(): Route { return this._futureSnapshot.routeConfig; } + toString(): string { return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`; } @@ -179,6 +181,8 @@ export class ActivatedRouteSnapshot { this._resolve = resolve; } + get routeConfig(): Route { return this._routeConfig; } + toString(): string { const url = this.url.map(s => s.toString()).join('/'); const matched = this._routeConfig ? this._routeConfig.path : '';