I am giving some links that will help you to understand about aura methods and events. you must follow these links. http://amitsalesforce.blogspot.com/2018/10/aura-method-in-lightning-component.html https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_component.htm https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_component_example.htm https://www.biswajeetsamal.com/blog/component-events-in-salesforce-lightning-framework/
when to choose what? Answer :- Aura:Method enables you to directly call a method in a component’s client-side controller instead of firing / handling a component event. so if you want to call a child component’s client-side controller method then you must use aura method. and if you want the full functionality of the child component then you must use aura event.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Greetings to you!
I am giving some links that will help you to understand about aura methods and events. you must follow these links.
http://amitsalesforce.blogspot.com/2018/10/aura-method-in-lightning-component.html
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_component.htm
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_component_example.htm
https://www.biswajeetsamal.com/blog/component-events-in-salesforce-lightning-framework/
when to choose what?
Answer :- Aura:Method enables you to directly call a method in a component’s client-side controller instead of firing / handling a component event. so if you want to call a child component’s client-side controller method then you must use aura method.
and if you want the full functionality of the child component then you must use aura event.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha