refactor(router): take advantage of the new way of configuring modules

This commit is contained in:
vsavkin
2016-07-27 09:54:19 -07:00
parent ba88db5141
commit 9d9e9c6ff1
11 changed files with 83 additions and 71 deletions

View File

@ -29,8 +29,8 @@ export const ROUTES = [
];
@NgModule({
imports: [WorkerAppModule, RouterModule],
providers: [provideRoutes(ROUTES), WORKER_APP_LOCATION_PROVIDERS, {provide: LocationStrategy, useClass: HashLocationStrategy}],
imports: [WorkerAppModule, RouterModule.forRoot(ROUTES, {useHash: true})],
providers: [WORKER_APP_LOCATION_PROVIDERS],
entryComponents: [App],
declarations: [App, Start, Contact, About]
})