I'm wondering if it would be possible on a button click to duplicate the child component template inside the parent's html syntax?
So;
<child-component></child-component>
<span class="glyphicon glyphicon-plus" (click)="onDuplicate()"></span>
then once the user clicks the '+' glyphicon and the onDuplicate() function is called,, the parent has:
<child-component></child-component>
<child-component></child-component>
<span class="glyphicon glyphicon-plus" (click)="onDuplicate()"></span>
etc etc.
I have been looking around for ways to do something like this but can't find anything so I'm not sure where to start. I was hoping someone could point me in the right direction?
Thanks