Help Angular by taking a 1 minute survey!Go to surveyHome

DoBootstrap

Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule annotation.

See more...

      
      interface DoBootstrap {
  ngDoBootstrap(appRef: ApplicationRef): void
}
    

Description

Reference to the current application is provided as a parameter.

See "Bootstrapping" and "Entry components".

Methods

ngDoBootstrap(appRef: ApplicationRef): void
      
      ngDoBootstrap(appRef: ApplicationRef): void
    
Parameters
appRef ApplicationRef
Returns

void

Usage notes

class AppModule implements DoBootstrap { ngDoBootstrap(appRef: ApplicationRef) { appRef.bootstrap(AppComponent); // Or some other component } }
      
      class AppModule implements DoBootstrap {
  ngDoBootstrap(appRef: ApplicationRef) {
    appRef.bootstrap(AppComponent); // Or some other component
  }
}