File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
packages/angular/ssr/src/routes Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 88
99import { APP_BASE_HREF , PlatformLocation } from '@angular/common' ;
1010import {
11- APP_INITIALIZER ,
1211 ApplicationRef ,
1312 Compiler ,
14- ComponentRef ,
1513 Injector ,
16- inject ,
1714 runInInjectionContext ,
1815 ɵConsole ,
16+ ɵENABLE_ROOT_COMPONENT_BOOTSTRAP ,
1917} from '@angular/core' ;
2018import { INITIAL_CONFIG , platformServer } from '@angular/platform-server' ;
2119import {
@@ -493,16 +491,8 @@ export async function getRoutesFromAngularRouterConfig(
493491 useFactory : ( ) => new Console ( ) ,
494492 } ,
495493 {
496- // We cannot replace `ApplicationRef` with a different provider here due to the dependency injection (DI) hierarchy.
497- // This code is running at the platform level, where `ApplicationRef` is provided in the root injector.
498- // As a result, any attempt to replace it will cause the root provider to override the platform provider.
499- // TODO(alanagius): investigate exporting the app config directly which would help with: https://github.com/angular/angular/issues/59144
500- provide : APP_INITIALIZER ,
501- multi : true ,
502- useFactory : ( ) => ( ) => {
503- const appRef = inject ( ApplicationRef ) ;
504- appRef . bootstrap = ( ) => undefined as unknown as ComponentRef < unknown > ;
505- } ,
494+ provide : ɵENABLE_ROOT_COMPONENT_BOOTSTRAP ,
495+ useValue : false ,
506496 } ,
507497 ] ) ;
508498
You can’t perform that action at this time.
0 commit comments