How do I get a reference to a child component of the current component from within the controller? For example:
<aura:component>
<div class="container">
<foo:myComponent />
</div>
</aura:component>
In this case I would like to have a reference to myComponent
from within this component's controller.
You need to assign an
aura:id
to your component and then usefind()
.Component:
Controller: