Skip to content

Commit 947f9c3

Browse files
vsavkinvikerman
authored andcommitted
feat(router): make router.config public
1 parent 7cd4741 commit 947f9c3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/@angular/router/src/router.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ export class Router {
131131
private locationSubscription: Subscription;
132132
private routerEvents: Subject<Event>;
133133
private navigationId: number = 0;
134-
private config: Routes;
135134
private configLoader: RouterConfigLoader;
136135

137136
/**
@@ -148,7 +147,7 @@ export class Router {
148147
private rootComponentType: Type<any>, private resolver: ComponentResolver,
149148
private urlSerializer: UrlSerializer, private outletMap: RouterOutletMap,
150149
private location: Location, private injector: Injector, loader: NgModuleFactoryLoader,
151-
config: Routes) {
150+
public config: Routes) {
152151
this.resetConfig(config);
153152
this.routerEvents = new Subject<Event>();
154153
this.currentUrlTree = createEmptyUrlTree();

tools/public_api_guard/router/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export interface Route {
166166

167167
/** @stable */
168168
export declare class Router {
169+
config: Routes;
169170
events: Observable<Event>;
170171
/** @experimental */ navigated: boolean;
171172
routerState: RouterState;

0 commit comments

Comments
 (0)