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 件の回答
Hi Preyanka,
Following links give very good examples-:
https://www.biswajeetsamal.com/blog/salesforce-lightning-aura-method/
https://rajvakati.com/2018/01/02/salesforce-aura-method/