I\'ve got an json full of datas with lowcase and upcase. For example :
[
{ \"firstName\":\"JoHn\" , \"lastName\":\"DoE\" },
{ \"firstName\":\"aNnA\" ,
There is a way to turn on case insensetive filter:
<div data-ng-repeat="item in items | filter : searchText : false"></div>
Plunker
Pass a function name to filter
which you define on an applicable scope, where you use string's toLowerCase. See ngFilter. The function signature is a simple function (item) { ... }
.
Example JS in your controller:
$scope.filterOnlyFoo = function (item) {
return item == "foo";
}
Example HTML:
<div data-ng-repeat="item in items | filter: filterOnlyFoo"></div>
Sample Plunker