If you have the following ng-repeat
:
<ul class="list-group">
<ng-user-item
ng-repeat="user in users | filter:search" user="user" ng-if="assigned.indexOf(user.id) < 0"
ng-click="selectFunction(user);"></ng-user-item>
</ul>
As you can see, there is a filter applied.
When the filter is not null
, I have a button displayed:
<button class="btn btn-default" ng-if="search.division != null" style="margin-bottom: 10px;">Select all</button>
When this button is clicked, I want to create a list of all visible ng-user-item
.
How can this functionality be achieved using Angular?