36
rated 0 times
[
40]
[
4]
/ answers: 1 / hits: 20958
/ 9 Years ago, tue, may 5, 2015, 12:00:00
I have two arrays, Users and Employments like so:
Users = [{id:1, name: ryan}, {id:2, name:Julie}]
Employments = [{user_id: 1, title: manager}, {user_id: 2, title: Professor}]
I'd like to display the Employments array in an ng-repeat like so:
<li ng-repeat=employment in Employments>
{{employment.user.name}}
</li>
How do I map the Users array to the Employments array?
More From » arrays