Created
April 3, 2019 19:39
-
-
Save mav-erick/754614027fcaac14260eaba6bc74dc53 to your computer and use it in GitHub Desktop.
AYS app module
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 { NgModule, Injector } from "@angular/core"; | |
import { AysComponent } from "./ays/ays.component"; | |
import { createCustomElement } from "@angular/elements"; | |
@NgModule({ | |
declarations: [AysComponent], | |
imports: [BrowserModule], | |
entryComponents: [AysComponent] | |
}) | |
export class AppModule { | |
constructor(injector: Injector) { | |
const ays = createCustomElement(AysComponent, { injector }); | |
customElements.define("ays-button", ays); | |
} | |
ngDoBootstrap() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment