I have
$scope.arrays = [{status:"active", name="John", id:1},{status:"inactive", name:"Deo", id:2},{status:"inactive", name:"Deo", id:3}]
what I have done is
<li ng-repeat="a in arrays | unique:'status'">{{a.status}}</li>
unique status doesnt list unique status. On ng-click I want to filter a table based on its status.
I have used
<li ng-click='myfilter = {status: "active"}'><a>Active</a></li>
<li ng-click='myfilter = {status: "inactive"}'><a>Inactive</a></li>
But I want to do this dynamically from the ng-repeat.
Another problem i'm facing is I want to add class active to it onclick, have referenced so many tutorials but all fails.Please give me some insights.