fix(router): fix offline compilation by exporting provideLocationStrategy
This commit is contained in:
parent
4624a35845
commit
8dc82a0080
|
@ -87,8 +87,8 @@ export class RouterModule {
|
|||
return {
|
||||
ngModule: RouterModule,
|
||||
providers: [
|
||||
ROUTER_PROVIDERS, provideRoutes(routes), {provide: ROUTER_CONFIGURATION, useValue: config},
|
||||
{
|
||||
ROUTER_PROVIDERS, provideRoutes(routes),
|
||||
{provide: ROUTER_CONFIGURATION, useValue: config ? config : {}}, {
|
||||
provide: LocationStrategy,
|
||||
useFactory: provideLocationStrategy,
|
||||
deps: [
|
||||
|
@ -104,7 +104,7 @@ export class RouterModule {
|
|||
}
|
||||
}
|
||||
|
||||
function provideLocationStrategy(
|
||||
export function provideLocationStrategy(
|
||||
platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {
|
||||
return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :
|
||||
new PathLocationStrategy(platformLocationStrategy, baseHref);
|
||||
|
|
Loading…
Reference in New Issue