From 947f9c3f56f4a791e86a9735d56b9998a6ec97d9 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Wed, 10 Aug 2016 21:41:44 -0700 Subject: [PATCH] feat(router): make router.config public --- modules/@angular/router/src/router.ts | 3 +-- tools/public_api_guard/router/index.d.ts | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/@angular/router/src/router.ts b/modules/@angular/router/src/router.ts index 560704d0bc..8a8b2954c4 100644 --- a/modules/@angular/router/src/router.ts +++ b/modules/@angular/router/src/router.ts @@ -131,7 +131,6 @@ export class Router { private locationSubscription: Subscription; private routerEvents: Subject; private navigationId: number = 0; - private config: Routes; private configLoader: RouterConfigLoader; /** @@ -148,7 +147,7 @@ export class Router { private rootComponentType: Type, private resolver: ComponentResolver, private urlSerializer: UrlSerializer, private outletMap: RouterOutletMap, private location: Location, private injector: Injector, loader: NgModuleFactoryLoader, - config: Routes) { + public config: Routes) { this.resetConfig(config); this.routerEvents = new Subject(); this.currentUrlTree = createEmptyUrlTree(); diff --git a/tools/public_api_guard/router/index.d.ts b/tools/public_api_guard/router/index.d.ts index d8dbb0480b..3fe43037a9 100644 --- a/tools/public_api_guard/router/index.d.ts +++ b/tools/public_api_guard/router/index.d.ts @@ -166,6 +166,7 @@ export interface Route { /** @stable */ export declare class Router { + config: Routes; events: Observable; /** @experimental */ navigated: boolean; routerState: RouterState;