Code By Code – Lightning Framework – Chapter 8 – Looping In Markup

Code By Code – Lightning Framework – Chapter 8 – Looping In Markup

Chapter 8

Topics for this chapter:
– Looping in Markup – aura:iteration

aura:iteration

You can loop through List or Set attribute using aura:iteration. You can operate over each element very easily using aura:iteration component.
This component takes an attribute “items” which can be a list or set and declares another attribute “var” which is a temporary variable for each element.

<aura:iteration items=”{!v.carTypes}” var=”carType”>
<option value=”{!carType.Id}” text=”{!carType.Name}” />
</aura:iteration>

Lightning Component Development Day3 - App, Attributes, Looping, Conditional Markup, Handling Events

Next In This Guide

Manish Choudhari

I am a certified Salesforce Application & System Architect and Developer working on Salesforce Technology since 2014. Currently, I have 14 Salesforce certifications along with OCPJP (Oracle Certified Profession JavaSE6 Programmer) working in Salesforce.com Hyderabad as a Technical Engineer. Writing technical blogs, learning new technologies and frameworks and sharing knowledge is my hobby.

Leave a Reply

Close Menu