fix(router): fix offline compilation by exporting provideLocationStrategy

This commit is contained in:
vsavkin 2016-08-01 15:51:22 -07:00
parent 4624a35845
commit 8dc82a0080
1 changed files with 3 additions and 3 deletions

View File

@ -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);