diff --git a/modules/@angular/router/src/common_router_providers.ts b/modules/@angular/router/src/common_router_providers.ts index a01c99f12c..01f8df5070 100644 --- a/modules/@angular/router/src/common_router_providers.ts +++ b/modules/@angular/router/src/common_router_providers.ts @@ -59,7 +59,12 @@ export function provideRouter(config: RouterConfig): any[] { // https://github.com/angular/angular/issues/9101 // Delay the router instantiation to avoid circular dependency (ApplicationRef -> // APP_INITIALIZER -> Router) - setTimeout(_ => injector.get(Router).initialNavigation(), 0); + setTimeout(_ => { + const appRef = injector.get(ApplicationRef); + appRef.registerBootstrapListener((_) => { + injector.get(Router).initialNavigation() + }); + }, 0); return _ => null; }, deps: [Injector]