I have an ionic-angular app where I heavily use custom components. These custom components sometimes contain another custom component. Like this:
<app-custom-component01>
<app-custom-component02></app-custom-component02>
</app-custom-component01>
Each component has a module, which is imported by the parent components module. This works perfectly fine when used with statically added components. But when I create CustomComponent01
dynamically with ViewContainerRef.createComponent
then I get the dreaded "<app-custom-component02> is not a known element..." error. Passing a ModuleRef to createComponent
doesn't resolve the problem. What am I missing here?