Created
November 5, 2018 16:28
-
-
Save vsavkin/8e38dbcbdc46c735394529143e172966 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule, Injector } from '@angular/core'; | |
import { createCustomElement } from '@angular/elements'; | |
import { HelloComponent } from './hello.component'; | |
@NgModule({ | |
declarations: [AppComponent], | |
imports: [BrowserModule], | |
providers: [], | |
entryComponents: [HelloComponent] | |
}) | |
export class AppModule { | |
constructor(injector: Injector) { | |
const el = createCustomElement(HelloComponent, { injector }); | |
customElements.define('nrwl-hello', el); | |
} | |
ngDoBootstrap() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment