DoBootstrap
인터페이스
안정화
Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule
annotation. This hook is invoked only when the bootstrap array is empty or not provided.
ngDoBootstrap
void@returns
void설명
Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule
annotation. This hook is invoked only when the bootstrap array is empty or not provided.
Reference to the current application is provided as a parameter.
See "Bootstrapping".
사용 시 참고사항
The example below uses ApplicationRef.bootstrap() to render the
AppComponent on the page.
class AppModule implements DoBootstrap {
ngDoBootstrap(appRef: ApplicationRef) {
appRef.bootstrap(AppComponent); // Or some other component
}
}
상세 내용으로 이동