@angular/core#DoBootstrap TypeScript Examples

The following examples show how to use @angular/core#DoBootstrap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: main-test.module.ts    From angular-miniprogram with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [],
  imports: [MiniProgramModule],
  exports: [],
  providers: [],
})
export class MainTestModule implements DoBootstrap {
  constructor() {}
  ngDoBootstrap() {}
}
Example #2
Source File: main.module.ts    From angular-miniprogram with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [],
  imports: [MiniProgramModule],
  exports: [],
  providers: [],
})
export class MainModule implements DoBootstrap {
  constructor() {}
  ngDoBootstrap() {}
}
Example #3
Source File: webcomponents.module.ts    From geonetwork-ui with GNU General Public License v2.0 5 votes vote down vote up
@NgModule({
  exports: [
    BaseComponent,
    GnFacetsComponent,
    GnResultsListComponent,
    GnAggregatedRecordsComponent,
  ],
  declarations: [
    BaseComponent,
    GnFacetsComponent,
    GnResultsListComponent,
    GnAggregatedRecordsComponent,
  ],
  imports: [
    CommonModule,
    UiInputsModule,
    UiSearchModule,
    FeatureSearchModule,
    StoreModule.forRoot({}),
    EffectsModule.forRoot(),
    UtilI18nModule,
    TranslateModule.forRoot(TRANSLATE_GEONETWORK_CONFIG),
    StoreDevtoolsModule.instrument(),
  ],
  providers: [
    {
      provide: Configuration,
      useValue: apiConfiguration,
    },
    SearchFacade,
  ],
})
export class WebcomponentsModule implements DoBootstrap {
  constructor(private injector: Injector) {
    CUSTOM_ELEMENTS.forEach((ceDefinition) => {
      const angularComponent = ceDefinition[0]
      const ceTagName = ceDefinition[1]

      const customElement = createCustomElement(angularComponent, {
        injector,
      })
      if (!customElements.get(ceTagName)) {
        customElements.define(ceTagName, customElement)
      }
    })
  }

  // eslint-disable-next-line
  ngDoBootstrap() {}
}