I am trying to set the value of aura attribute
in aura iteration
.I am declaring
<aura:attribute name="flag" type="integer" default="0"/>
And in <aura:iteraton>
i am trying to set this flag value but i am unable to do it due to following error:
Failed to save undefined: The attribute "flag" was not found on the COMPONENT markup://aura:iteration: Source
And i am setting the value like following:
<aura:attribute name="flag" value="0" type="integer"/>
<aura:iteration>
<!-- some condition goes here to set the value-->
<aura:set attribute="flag" value="{add(v.flag,1)}"/>
</aura:iteration>
!
HERE{!add(v.flag,1)}
– Ratan Paul Apr 27 '17 at 5:59type="Integer"
instead ontype="integer"
as we all know JS is case sensitive. This might be an issue. – itzmukeshy7 Apr 27 '17 at 6:28<aura:set>
.Thanks anyways' – Deepak Agarwal Apr 27 '17 at 9:08