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
@ -94,6 +94,9 @@ export declare class Location {
|
||||
static stripTrailingSlash(url: string): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
|
||||
|
||||
/** @experimental */
|
||||
export interface LocationChangeEvent {
|
||||
type: string;
|
||||
|
@ -93,6 +93,10 @@ export declare const WORKER_APP_LOCATION_PROVIDERS: ({
|
||||
useFactory: (platformLocation: WebWorkerPlatformLocation, zone: NgZone) => () => Promise<boolean>;
|
||||
multi: boolean;
|
||||
deps: (typeof NgZone | typeof PlatformLocation)[];
|
||||
} | {
|
||||
provide: InjectionToken<Promise<any>>;
|
||||
useFactory: (platformLocation: WebWorkerPlatformLocation) => Promise<any>;
|
||||
deps: typeof PlatformLocation[];
|
||||
})[];
|
||||
|
||||
/** @experimental */
|
||||
|
@ -76,7 +76,7 @@ export declare type Event = NavigationStart | NavigationEnd | NavigationCancel |
|
||||
export interface ExtraOptions {
|
||||
enableTracing?: boolean;
|
||||
errorHandler?: ErrorHandler;
|
||||
initialNavigation?: boolean;
|
||||
initialNavigation?: InitialNavigation;
|
||||
preloadingStrategy?: any;
|
||||
useHash?: boolean;
|
||||
}
|
||||
|
Reference in New Issue
Block a user