Skip to content

Instantly share code, notes, and snippets.

@lydemann lydemann/app.module.ts
Last active Sep 2, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.