Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
shared-ui-elements.module.ts
@NgModule({
imports: [BrowserModule, ...IMPORTS, TranslateModule.forRoot()],
declarations: [],
exports: [...IMPORTS],
})
export class SharedUiElementsModule {
constructor(private injector: Injector) {}
public ngDoBootstrap() {
const elements: Array<[Type<any>, string]> = [
// UI lib components go here
[CrudItemComponent, 'app-crud-item'],
];
for (const [component, name] of elements) {
const el = createCustomElement(component, { injector: this.injector });
customElements.define(name, el);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.