From 2eda7a52931b8ae8c8429dfcfd79e1a2912a5d3d Mon Sep 17 00:00:00 2001 From: Victor Savkin Date: Wed, 3 Aug 2016 19:35:12 -0700 Subject: [PATCH] fix(router): provideRouter should use provideRoutes (#10488) --- modules/@angular/router/src/common_router_providers.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/@angular/router/src/common_router_providers.ts b/modules/@angular/router/src/common_router_providers.ts index e6171ce902..38a1dbd8ba 100644 --- a/modules/@angular/router/src/common_router_providers.ts +++ b/modules/@angular/router/src/common_router_providers.ts @@ -81,8 +81,7 @@ export function initialRouterNavigation(router: Router) { */ export function provideRouter(routes: Routes, config: ExtraOptions = {}): any[] { return [ - {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes}, - {provide: ROUTES, useExisting: ROUTER_CONFIG}, {provide: ROUTER_CONFIG, useValue: routes}, + provideRoutes(routes), {provide: ROUTER_CONFIGURATION, useValue: config}, Location, {provide: LocationStrategy, useClass: PathLocationStrategy},