I have a parent component in which I have set up an array of child components (each extending BaseChild). I use an *ngFor to loop through the children and display their name. I would like to click on the name of the child and insert the html of the child into the parent. However I don't want to hardcode a lot of *ngIf={{child1ShouldBeDisplayed}} in the parent html - there will be a lot of children and things will get very ugly.
I've tried using ng-content as suggested here but it seems that this is for injecting parent html into the child (from here). I've read through a description of ng-template, ng-container etc here but it doesn't seem to meet my needs.
Here is a StackBlitz which sets up the basic code. I'm not sure how to continue. Is there a way to choose which child to display in the parent without the use of loads of *ngIf statements?