I have defined two custom lightning component. Id like to append one of them inside the other when the user clicks on one element For Instance the first element is invoices.cmp, it has this icon :
<lightning:icon iconName="utility:add" size="small"
onclick="{!c.addLine}"/>
<div id="factureLines">
<p>Add a line to this facture</p>
<c:LineFields/>
</div>
I would like to append to the div with id factureLines
another instance of my custom component LineFields...
How would you define the function addLine in the invoice component controller to achieve this.