-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.module.ts
More file actions
33 lines (29 loc) · 1000 Bytes
/
Copy pathapp.module.ts
File metadata and controls
33 lines (29 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { DoBootstrap, Injector, NgModule } from '@angular/core';
import { createCustomElement } from '@angular/elements';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { HeaderWrapperComponent } from './header/header-wrapper.component';
import { NotificationComponent } from './notification/notification.component';
@NgModule({
declarations: [
AppComponent,
HeaderWrapperComponent,
NotificationComponent
],
imports: [
BrowserModule
],
providers: [],
entryComponents: [
AppComponent
],
bootstrap: [AppComponent]
})
export class AppModule implements DoBootstrap {
constructor(private injector: Injector) {
// turn NotificationComponent into a web component for use in React
const notificationComponent = createCustomElement(NotificationComponent, { injector: this.injector });
customElements.define('notification-web-component', notificationComponent);
}
ngDoBootstrap() { }
}