0
votes

I need to set a filter in the ng-repeat tag to loop a userlist with items (cards) that each user has.

I've tried to set a filter with "filterSet" but this doesn't work for me.

How can I get the items of each user?

<ul data-drop="true" ng-repeat="user in userList" jqyoui-droppable="{multiple:true}">

<li ng-repeat="card in cardList" data-drag="true" data-jqyoui-options="{revert: 'invalid'}" jqyoui-draggable="{index: {{$index}},animate:true}">{{card}}</li> </ul>
1
You should use the orderByPriority filter first to convert the object into an array, and then apply the filter you want. - Anant

1 Answers

0
votes

I'm guessing the cardList is a property of the user object, so try:

<ul data-drop="true" ng-repeat="user in userList" jqyoui-droppable="{multiple:true}">

<li ng-repeat="card in user.cardList" data-drag="true" data-jqyoui-options="{revert: 'invalid'}" jqyoui-draggable="{index: {{$index}},animate:true}">{{card}}</li> </ul>