interface
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.
interface DoBootstrap { ngDoBootstrap(appRef: ApplicationRef): void }
Reference to the current application is provided as a parameter.
See "Bootstrapping".
Further information is available in the Usage Notes...
ngDoBootstrap() |
---|
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 } }
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/core/DoBootstrap