I have a set of items that I want to filter in ng-repeat using an ng-model as the string to filter the set, so far I haven\'t found a way to make it work when the expression
If you're using a method to filter than prefixing the method name with '!' will not work. Instead you can do something like:
// You can register this in your AppCtrl if you like, otherwise just use $scope.
$rootScope.not = function(func) {
return function (item) {
return !func(item);
}
};
Then you do:
filter:not(myFilterMethod)
In your html it would look like:
Reference: https://stackoverflow.com/a/17811582/175830