Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. $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"}]
  2.  
  3. $scope.getProduct = function(){return ($scope.values || []).map(function(w){return w.Product;}).filter(function(w,idx,arr){return arr.indexOf(w)===idx;});};
  4.  
  5. <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