I am trying to display a dynamic component similar (not exact) to the example in angular docs.
I have a dynamic directive with viewContainerRef
@Dire
I had the same problem. You have to add the directive into the AppModule:
@NgModule({ declarations: [ AppComponent, ..., YourDirective, ], imports: [ ... ], providers: [...], bootstrap: [AppComponent], entryComponents: [components to inject if required] })