I'm now learning Lightning and trying to build some simple app.
I followed this answer to get navigation between views. And in my component(foo) I got the following:
<aura:attribute name="myObjects" type="ak90.myObject__c[]"/>
<aura:attribute name="objId" type="String" />
//some code ...
<aura:iteration items="{!v.myObjects}" var="obj">
<div>
<ui:button label="{!obj.ak90__Name__c}" aura:id="{!obj.Id}" press="{!c.navToBar}"/>
</div>
</aura:iteration>
And depending on which button was clicked I want to set objId
attribute to Id
of that record so that I can pass it to the next view that should load more detailed view of that record.