Hi Sushant,
Yes, it can. To this you have to roughly follow these steps:
- Create the component using $A.createComponent
- Finding the parent component to attach the dynamic child using component.find(parentId) which returns the component instance(Aura.Component)
- Then getting the body of the above, then adding dynamic child to the body and setting the body.
- So, child component(dynamic) needs to be inside the body of the parent component to be rendered in the view.
Also remember, you are attaching the dynamically created component to the body of the <div aura:id=”divDynamicChild”></div> not to the actualy body of the component <c:testFindDynamic_Parent>.
Hope this helps.