refactor(core): introduce @NgModule.bootstrap
and ngDoBootstrap
method
If a `@NgModule` has a `bootstrap` property, `PlatformRef.bootstrapModule` / `PlatformRef.bootstrapModuleFactory` will automatically bootstrap the components listed in there. If such a property does not exist, `PlatformRef.bootstrapModule` / `PlatformRef.bootstrapModuleFactory` will try to call the method `ngDoBootstrap(appRef: ApplicationRef)` on the module class. Otherwise an error is reported.
This commit is contained in:
@ -34,4 +34,6 @@ import {CompWithChildQuery, CompWithDirectiveChild} from './queries';
|
||||
})
|
||||
export class MainModule {
|
||||
constructor(public appRef: ApplicationRef) {}
|
||||
|
||||
ngDoBootstrap() {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user