Lightning Component Development Series Day 3
Welcome back again developers :). In our previous session we saw how you can work with Lightning Base component and we also created a basic percentage calculator.
Find the agenda for day 3
- Attributes in Lightning Component
- Data Types in Lightning component
- Collection in Lightning component
- List
- Set
- Map
- Array
- Value Providers in Lightning component
- How to call JS method from Component
- Call Server Side(JavaScript) action on button click
No audio by the end of the video.
Yeah, Thanks buddy for reporting. I am working on this and soon it will get resolved
How v and c are diff with each other ?
I dint understood can u tell ans once again
v is used to access the value of the Attribute in aura component.
c is used to call the action of either from aura component to JavaScript Controller or From JavaScript Controller/Helper to Apex Class.
Hope it is clear to you now.
Thanks,
SFDCPanther
It is not displaying the value of my set in the component as shown in the video. Below is my code for displaying the set.
{!v.ColorSet[1]}
But I am able to print the set using the below code
{!s}
I do not know what value you are using for your attribute but {!v.ColorSet[1]} is the correct way to get the value. Below is the code that I have tried and it’s working fine.
aura:attribute name="collection" type="Set" default="['red', 'green', 'blue']"
div class="slds-m-around_small"
{!v.collection[1]}
div
One more thing you need to be more careful while developing the component as it is case Sensitive and a silly mistake is going to break the code.