Skip to content

Instantly share code, notes, and snippets.

@siddharthpal
Last active October 13, 2019 18:55
Show Gist options
  • Save siddharthpal/46024cbbd611b7f1b1529246bd8c6c26 to your computer and use it in GitHub Desktop.
Save siddharthpal/46024cbbd611b7f1b1529246bd8c6c26 to your computer and use it in GitHub Desktop.
Registering Custom Element
@NgModule({
imports: [BrowserModule, TodoModule],
entryComponents: [TodoComponent]
})
export class TodoWrapperModule {
constructor(private injector: Injector) {
const todoElement = createCustomElement(TodoComponent, {
injector: this.injector
});
customElements.define('todo-root-angular-element', todoElement);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment