DoBootstrap
挂钩以手动引导应用程序,而不是在 @NgModule 标记中的 bootstrap 数组。
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".
Further information available in the Usage Notes...
方法
使用说明
class AppModule implements DoBootstrap {
ngDoBootstrap(appRef: ApplicationRef) {
appRef.bootstrap(AppComponent); // Or some other component
}
}