Thursday, September 6, 2018

Aura iteration in lightning component

Aura iteration iterates over collection of items and render body for each item in collection.


Syntax:

<aura:iteration items="{!v.listname}" var="somevariable">
         {!somevariable}    
</aura:iteration>


Let's display list in lightning component.

<aura:component >  

<aura:attribute type="List" name="Listattribute" default="{'Apple','Orange','Mango'}" />

    <aura:iteration items="{!v.Listattribute}" var="m">
         {!m}    
    </aura:iteration>

</aura:component>

DO VISIT,

How to Use Map in Lightning Component (Click here)

The topic "how to use map in lightning component" covers :

1) Simply storing and displaying value from map in lightning component.

2)Displaying map by using aura iteration.

**************************************************************************************************************

TAGS:Aura iteration in lightning component, aura:iteration,aura:iteration Salesforce Lightning.

**************************************************************************************************************

No comments:

Post a Comment