I want to filter my data in table after click the button. Here is my filter :
app.filter('eyeFilterFunction',function(){
return function(data, from) {
if (!from) return data;
var items = [];
angular.forEach(data, function(item){
if(item.weight != from) {
items.push(item);
}
});
return items;
};
});
And my plunker : http://plnkr.co/edit/s7tuhKXFSt0Yv5BfI4h0?p=preview
What i want - after click the button, only shows in table data with weight , where it is null in wehgit let it not show.
Thanks for answers in advance!