I am using *ngContainerOutlet to dynamically load components, but it encapsulates the component's template in a ng-component tag, causing my CSS rules to fail.
For instance with :
<div class="my-class">
    <ng-container *ngComponentOutlet="MyComponent"></ng-container>
</div>
I end up with something like :
<div class="my-class">
    <ng-component>
        <div>my content...</div>
    </ng-component>
</div>
causing my-class to not be applied to the component's template.
I tried to create a CSS rule like my-class > ng-component but since it's dynamically created it doesn't work. Same with :first-child.
Is there a solution, either with CSS or Angular (for instance, prevent this encapsulation)?
Thanks, Alexandre
 
    