import { BrowserModule } from '@angular/platform-browser' ; import { Injector , NgModule } from '@angular/core' ; import { createCustomElement } from '@angular/elements' ; import { HelloComponent } from './hello/hello.component' ; @ NgModule ( { declarations : [ HelloComponent ] , imports : [ BrowserModule ] , providers : [ ] } ) export class AppModule { ngDoBootstrap ( ) { } constructor ( injector ) { const helloElement = createCustomElement ( HelloComponent , { injector } ) ; customElements . define ( 'app-hello' , helloElement ) ; } }