fix(core): add bootstrapped modules into platform modules list (#13740)
Closes #12015 PR Close #13740
This commit is contained in:

committed by
Miško Hevery

parent
5f40e5ba21
commit
863285a4b0
@ -326,7 +326,7 @@ export class PlatformRef_ extends PlatformRef {
|
||||
.then((moduleFactory) => this._bootstrapModuleFactoryWithZone(moduleFactory, ngZone));
|
||||
}
|
||||
|
||||
private _moduleDoBootstrap(moduleRef: NgModuleInjector<any>) {
|
||||
private _moduleDoBootstrap(moduleRef: NgModuleInjector<any>): void {
|
||||
const appRef = moduleRef.injector.get(ApplicationRef);
|
||||
if (moduleRef.bootstrapFactories.length > 0) {
|
||||
moduleRef.bootstrapFactories.forEach((compFactory) => appRef.bootstrap(compFactory));
|
||||
@ -337,6 +337,7 @@ export class PlatformRef_ extends PlatformRef {
|
||||
`The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ` +
|
||||
`Please define one of these.`);
|
||||
}
|
||||
this._modules.push(moduleRef);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user