Skip to main content
Hello Team,

 

What is the exact use of aura:method in lightning component, as we can pass the value of a param from parent to child component using below option also. Then in which situation we need to use aura:method.

 

 

<!--ChildCmp.cmp-->

<aura:component >    

        <aura:attribute name="Name" type="String" default=""/> 

</aura:component>

 

<!--ParentCmp.cmp-->

<aura:component >

    <aura:attribute name="message" type="String"  default="Preyanka"/>

    <c:ChildCmp Name="{!v.message}" />

</aura:component>

 

Thanks
3 件の回答
0/9000