Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.value =[{"Product":"Table","Country":"United States","id":"17619"},{"Product":"Chair","Country":"Pakistan","id":"17618"},{"Product":"Keyboard","Country":"Pakistan","id":"17617"},{"Product":"Chair","Country":"Pakistan","id":"17615"}]
- $scope.getProduct = function(){return ($scope.values || []).map(function(w){return w.Product;}).filter(function(w,idx,arr){return arr.indexOf(w)===idx;});};
- <select ng-model="product"><option ng-repeat="p in getProduct()" ng-model="filter[p]">{{p}}</option></select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement