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

  1. Attributes in Lightning Component
  2. Data Types in Lightning component
  3. Collection in Lightning component
    1. List
    2. Set
    3. Map
    4. Array
  4. Value Providers in Lightning component
  5. How to call JS method from Component
  6. Call Server Side(JavaScript) action on button click

Lightning Component Development Session Day 3 - #Attributes #DataTypes #Collection #ValueProviders

Amit Singh
Amit Singh

Amit Singh aka @sfdcpanther/pantherschools, a Salesforce Technical Architect, Consultant with over 8+ years of experience in Salesforce technology. 21x Certified. Blogger, Speaker, and Instructor. DevSecOps Champion

Articles: 292

6 Comments

    • 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

  1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *