Last active
October 13, 2019 16:46
-
-
Save siddharthpal/4fedff8d4c9d4a04d22a696ccf127d77 to your computer and use it in GitHub Desktop.
Compiling Angular Component to Custom Element
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
@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