fix(router): provideRouter should use provideRoutes (#10488)

This commit is contained in:
Victor Savkin 2016-08-03 19:35:12 -07:00 committed by vikerman
parent 9925aa89dc
commit 2eda7a5293
1 changed files with 1 additions and 2 deletions

View File

@ -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},