填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

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".

方法

ngDoBootstrap(appRef: ApplicationRef): void
      
      ngDoBootstrap(appRef: ApplicationRef): void
    
参数
appRef ApplicationRef
返回值

void

使用说明

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
  }
}