fix(router): do not finish bootstrap until all the routes are resolved (#14762)
DEPRECATION: Use `RouterModule.forRoot(routes, {initialNavigation: 'enabled'})` instead of `RouterModule.forRoot(routes, {initialNavigtaion: true})`. Before doing this, move the initialization logic affecting the router from the bootstrapped component to the boostrapped module. Similarly, use `RouterModule.forRoot(routes, {initialNavigation: 'disabled'})` instead of `RouterModule.forRoot(routes, {initialNavigation: false})`. Deprecated options: 'legacy_enabled', `true` (same as 'legacy_enabled'), 'legacy_disabled', `false` (same as 'legacy_disabled'). The "Router Initial Navigation" design document covers this change. Read more here: https://docs.google.com/document/d/1Hlw1fPaVs-PCj5KPeJRKhrQGAvFOxdvTlwAcnZosu5A/edit?usp=sharing
This commit is contained in:

committed by
Chuck Jazdzewski

parent
1cff1250ba
commit
5df998d086
@ -25,7 +25,9 @@ export const ROUTES = [
|
||||
|
||||
@NgModule({
|
||||
imports: [WorkerAppModule, RouterModule.forRoot(ROUTES, {useHash: true})],
|
||||
providers: [WORKER_APP_LOCATION_PROVIDERS],
|
||||
providers: [
|
||||
WORKER_APP_LOCATION_PROVIDERS,
|
||||
],
|
||||
bootstrap: [App],
|
||||
declarations: [App, Start, Contact, About]
|
||||
})
|
||||
|
Reference in New Issue
Block a user