I am trying to apply a filter using checkboxes.
Checkboxes are correct:
<div data-ng-repeat="cust in customers"> <input type="checkbox" data-ng-model="search.city" data-ng-true-value="{{ cust.city }}" data-ng-false-value=""/> {{ cust.city }} </div>
but when checking any flag nothing happens:
<table> <tbody> <tr data-ng-repeat="customer in customers | filter : search"> <td > {{ customer.firstName }} </td> <td > {{ customer.lastName }} </td> <td > {{ customer.address }} </td> <td > {{ customer.city }} </td> </tr> </tbody> </table>
The table shows all clients.
I want to achieve: when one or more checkboxes are checked, the table should show only those rows that match the condition of the checked checkboxes.
What do I need to do to make this work?
source share