Last active
September 2, 2018 18:16
-
-
Save lydemann/80f9775393deca82092660f8d8508203 to your computer and use it in GitHub Desktop.
This file contains 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/hello.component'; | |
@NgModule({ | |
declarations: [ | |
HelloComponent | |
], | |
imports: [ | |
BrowserModule | |
], | |
providers: [], | |
entryComponents: [HelloComponent] | |
}) | |
export class AppModule { | |
/** | |
* | |
*/ | |
constructor(private injector: Injector) { | |
} | |
ngDoBootstrap() { | |
const helloComponentEl = createCustomElement(HelloComponent, { injector: this.injector }); | |
customElements.define('hello', helloComponentEl); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment