For loop in aura component - Salesforce Globe For You
ForLoop.cmp
<aura:component >
<aura:attribute name="fruits" type="List" default="['Mango','Apple','Orange','Kiwi']"/>
The available fruits are <br/>
<aura:iteration items="{!v.fruits}" var="fruit" indexVar="index">
{!index+1}) {!fruit}<br/>
</aura:iteration>
</aura:component>
TestApp.app
<aura:application extends="force:slds">
<c:ForLoop/>
</aura:application>
Output:
No comments:
Post a Comment