0

I just tried to cleanup an angular 10 stackblitz by removing the entryComponents, but that broke the whole app

@NgModule({
  imports:      [ BrowserModule ],
  declarations: [ AppComponent, TestComponent ],
  entryComponents: [ TestComponent ]
})
export class AppModule { 
  constructor(private injector: Injector) {
    const customElement = createCustomElement(TestComponent, { injector });
    customElements.define('test-ce', customElement);
  }

  ngDoBootstrap() { }
}

The stackblitz

Any suggestions what the reason might be that this property is still needed?

Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
  • Does this answer your question? [Why entryComponents is not necessary anymore in Angular 9/ivy compiler?](https://stackoverflow.com/questions/61541876/why-entrycomponents-is-not-necessary-anymore-in-angular-9-ivy-compiler) – Janos Vinceller Oct 13 '20 at 08:35

1 Answers1

5

You should enable Ivy first

enter image description here

Forked Stackblitz

yurzui
  • 205,937
  • 32
  • 433
  • 399