Created
June 10, 2018 16:16
-
-
Save daniele-zurico/a604988502b5f52475fe6a80c93b2e35 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
| import { | |
| MatTableModule, | |
| MatPaginatorModule, | |
| MatSortModule, | |
| } from '@angular/material'; | |
| import { createCustomElement } from '@angular/elements'; | |
| import { AppComponent } from './app.component'; | |
| @NgModule({ | |
| declarations: [AppComponent], | |
| imports: [ | |
| BrowserModule, | |
| BrowserAnimationsModule, | |
| MatTableModule, | |
| MatPaginatorModule, | |
| MatSortModule, | |
| ], | |
| providers: [], | |
| bootstrap: [], | |
| entryComponents: [AppComponent], | |
| }) | |
| export class AppModule { | |
| constructor(private injector: Injector) {} | |
| ngDoBootstrap() { | |
| const elm = createCustomElement(AppComponent, { injector: this.injector }); | |
| customElements.define('ngx-data-table', elm); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment