Currently, I have a parent component managing multiple child components. My goal is to enclose each child component's template with a *ngIf directive for conditional rendering. The number of children in the parent component can vary.
Here is an example of the current view structure:
<parent>
<child1></child1>
<child2></child2>
</parent>
<ng-content></ng-content>
The content inside ng-content represents the template of the child components. While this setup functions as intended, I need the ability to dynamically control which child components are displayed based on certain conditions. For instance, hiding the template of child1 when child2 is selected. I have considered using *ngIf to wrap each child component's template but haven't found a suitable way to implement this logic yet.