Last active
October 13, 2019 18:55
-
-
Save siddharthpal/46024cbbd611b7f1b1529246bd8c6c26 to your computer and use it in GitHub Desktop.
Registering 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