Skip to content

Instantly share code, notes, and snippets.

@mav-erick
Created April 3, 2019 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mav-erick/754614027fcaac14260eaba6bc74dc53 to your computer and use it in GitHub Desktop.
Save mav-erick/754614027fcaac14260eaba6bc74dc53 to your computer and use it in GitHub Desktop.
AYS app module
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