I'm doing a modal screen search of a system I'm doing, and am encountering the following problem when implementing the filter: I'm filtering an array of objects in a ng-repeat, each object has 3 fields, however I want to filter only two, I tried to do a function filter type: getFiltered and filter it through the 2 fields, but I could not save the filter array in a variable.
$scope.getFiltered = function(items){
if(item.DescriptionSearch.indexOf($scope.comando.text) > -1){
return true;
}else if(item.Command != null){
if(item.Command.indexOf($scope.comando.text) > -1){
return true;
}
}else{
return false;
}
};