Last active
August 27, 2019 16:33
-
-
Save hetdev/069c173e7f17ee32fb038bce112e2500 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 {DoBootstrap, Injector, NgModule} from '@angular/core'; | |
import { AppComponent } from './app.component'; | |
import {createCustomElement} from '@angular/elements'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
BrowserModule | |
], | |
providers: [], | |
// bootstrap: [AppComponent], | |
entryComponents: [ | |
AppComponent | |
] | |
}) | |
export class AppModule implements DoBootstrap { | |
constructor(private injector: Injector) { | |
} | |
ngDoBootstrap() { | |
const el = createCustomElement(AppComponent, { injector: this.injector }); | |
customElements.define('phoenix-wc-wiki-ngx', el); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment