fix(router): provideRouter should use provideRoutes (#10488)
This commit is contained in:
parent
9925aa89dc
commit
2eda7a5293
@ -81,8 +81,7 @@ export function initialRouterNavigation(router: Router) {
|
|||||||
*/
|
*/
|
||||||
export function provideRouter(routes: Routes, config: ExtraOptions = {}): any[] {
|
export function provideRouter(routes: Routes, config: ExtraOptions = {}): any[] {
|
||||||
return [
|
return [
|
||||||
{provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},
|
provideRoutes(routes),
|
||||||
{provide: ROUTES, useExisting: ROUTER_CONFIG}, {provide: ROUTER_CONFIG, useValue: routes},
|
|
||||||
|
|
||||||
{provide: ROUTER_CONFIGURATION, useValue: config}, Location,
|
{provide: ROUTER_CONFIGURATION, useValue: config}, Location,
|
||||||
{provide: LocationStrategy, useClass: PathLocationStrategy},
|
{provide: LocationStrategy, useClass: PathLocationStrategy},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user