I have a componentA that has an ng-content. After this I have a componentB inside the component A. The componentB has a componentC in his template.
componentA template:
<ng-content></ng-content>
componentB template:
<componentC></componentC>
componentC template:
<div>
<span>test</span>
<div>
In my html I have this final solution:
<componentA>
<componentB></componentB>
</componentA>
I would use a viewChild inside the componentA to find componentC that's inside componentB but it returns undefined
@ViewChild(ComponentC) componentC: ComponentC
How can I solve this issue?