I have an angular application uses routing with HashLocationStrategy, I need to set different value in main html file and different in routing.
I tried this solutio
yahoooooooooooo !! got it to work.
in your index.html file, specify the baseurl as "." like this:
and specify the hash location strategy in your providers property in your NgModule decorator in your app.module.ts, like this:
@NgModule({
declarations: [AppComponent],
imports: [
FormsModule,
HttpModule,
AppRoutingModule,
ShellModule,
ShellProvidersModule,
BrowserModule
],
providers: [
SessionService,
{ provide: LocationStrategy, useClass: HashLocationStrategy },
],
bootstrap: [AppComponent]
})
export class AppModule { }
see: https://github.com/datumgeek/plotter-app-seed-angular2/blob/master/src/app/app.module.ts#L26
running demo here: https://datumgeek.github.io/plotter-app-seed-angular2/#/shell;stateRepositoryId=file-host-01;sessionId=session-03