Wednesday, 28 August 2013

How can I look up by index within an ng-repeat?

How can I look up by index within an ng-repeat?

In my view, I have:
<div class="grid-wrapper grid-view type-A has-thumbnail" ng-repeat="artist
in artists">
So artist.id has an id for that artist.
I have another object called album_artists that looks like:
album_artists = {
'1231': {
...
},
'1232': {
...
}
}
So within my div, I want to get thealbum_artiststhat corresponds to a
particularartist.id`. How can I do this?

No comments:

Post a Comment