You need to sign in to do that
Don't have an account?
Patrick McClellan
setting attributes from nested components
I'm trying to understand how to communicate/ set attributes (variables) in nested components. Here's the situation:
Top level component: enterResult.cmp -- contains an aura:iterate that calls...
Second level component: topicItem.cmp.
I'm running a doInit handler in topicItemController.js, where I want to get an attibute from Top Level enterResult.cmp, add 1, then set an attribute in Second level component topicItem.cmp.
Any help, links to documentation, and/or examples would be appreciated. Thanks!
Top level component: enterResult.cmp -- contains an aura:iterate that calls...
Second level component: topicItem.cmp.
I'm running a doInit handler in topicItemController.js, where I want to get an attibute from Top Level enterResult.cmp, add 1, then set an attribute in Second level component topicItem.cmp.
Any help, links to documentation, and/or examples would be appreciated. Thanks!
The components can communicate with events (application and component events) and Attributes or Methods.
In the Lightning Component Framework (LCF), inter-component communication is supported in several well-defined ways. One can only use the following developer-defined interfaces to specify what can be exchanged:
Attributes or Methods to pass data down the component hierarchy
Lightning Events to pass data up and around in the component hierarchy
https://developer.salesforce.com/blogs/developer-relations/2017/04/lightning-inter-component-communication-patterns.html
Regards
Alain
All Answers
The components can communicate with events (application and component events) and Attributes or Methods.
In the Lightning Component Framework (LCF), inter-component communication is supported in several well-defined ways. One can only use the following developer-defined interfaces to specify what can be exchanged:
Attributes or Methods to pass data down the component hierarchy
Lightning Events to pass data up and around in the component hierarchy
https://developer.salesforce.com/blogs/developer-relations/2017/04/lightning-inter-component-communication-patterns.html
Regards
Alain
https://developer.salesforce.com/blogs/developer-relations/2016/05/meet-new-emea-developer-evangelists.html
https://developer.salesforce.com/blogs/developer-relations/2016/11/lightning-now-european-tour.html
Regards