I\'m going off by this example fiddle where it demonstrates the use of comparator parameter to filter exact matches....:
http://jsfiddle.net/api/post/library/pure/
You'll want to use a custom comparator function. It will allow you to perform a strict comparison except when the predicate is falsy.
Your markup would then be:
<input type="text" class="form-control" id="search.priority"
title='Priority number to filter by'
ng-model="search.priority" >
<tr ng-repeat="workflowItem in workflows | filter:search:exceptEmptyComparator">
<td>{{workflowItem.priority}}</td>
And define the comparator function on your controller:
$scope.exceptEmptyComparator = function (actual, expected) {
if (!expected) {
return true;
}
return angular.equals(expected, actual);
}
That should do the trick.