In Visualforce apex:variable can be used to avoid the repetition of a Visualforce expression.
I have a collection returned from an @AuraEnabled
method for which I want to do the same sort of thing that apex:variable
does:
<aura:iteration var="item" items="{! v.items }">
<!-- aura:variable does not exist: is there a way to do this in Lightning? -->
<aura:variable var="sob" value="{! item.reference.sobReference }"/>
<tr>
<td>{! sob.Name }</td>
<td>{! sob.Birthdate }</td>
...
Is there a way to do this in Lightning Components?
sob
reference.