1

I'm trying to get the key/value pair in the aura component

Aura component:

<aura:attribute name="countryMap" type="Map"  default="{}"/>
<aura:attribute name="currentCountry" type="String" />

<aura:iteration items="{!v.countryMap}" var="cus" indexVar="key">
       here is the key:= {!cus.key} - {!cus.value}<br/><br/>
</aura:iteration>

Controller.js:

 var countryMap = component.get("v.countryMap");
 var newcountryMap = {
            'us': $A.get("$Label.c.countryUSAURL"),
            'ca': $A.get("$Label.c.countryCANURL")
        };
langMap = newLangMap;

Does not work, countryMap is empty

2

0

You must log in to answer this question.

Browse other questions tagged .