0

I dont understand what is the problem here. I have to show list of about 48 countries like below but nothing is coming in UI. I have tried every possible combination but no use!

<aura:component implements="lightning:isUrlAddressable" access="GLOBAL">

    <aura:attribute name="countries" type="List" default="[
                                                          { Name: 'USA' },
                                                          { Name: 'India' },
                                                          { Name: 'China' }]" />

    <ol>
        <aura:iteration items="{!v.countries}" var="ctry">
            <li>{!ctry.name}</li>   
        </aura:iteration>
    </ol>

</aura:component>

1 Answer 1

0

because of your ol it's not rendering, just replace ol with ul it works

 <ul>
        <aura:iteration items="{!v.countries}" var="ctry">
            <li>{!ctry.Name}</li>   
        </aura:iteration>
    </ul>

enter image description here

1
  • What's the problem with an ordered list in Aura?
    – isherwood
    Sep 21, 2023 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .