DoBootstrap
Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule annotation.
interface DoBootstrap {
ngDoBootstrap(appRef: ApplicationRef): void
}
说明
Reference to the current application is provided as a parameter.
See "Bootstrapping" and "Entry components".
方法
使用说明
class AppModule implements DoBootstrap {
ngDoBootstrap(appRef: ApplicationRef) {
appRef.bootstrap(AppComponent); // Or some other component
}
}