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:
{{workflowItem.priority}}
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.
讨论(0)
- 热议问题