This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Null filter not returning anything: filter:{category:null}" #1780
Closed
Description
Dataset:
$scope.objs = [{name:'obj1', category:null}, {name:'obj2', category:null}, {name:'obj3', category:null}, {name:'obj4', category:1}, {name:'obj5', category:1}, {name:'obj6', category:1}, {name:'obj7', category:2}, {name:'obj8', category:2}, {name:'obj9', category:2}];
When i create an ng-repeat like this it returns the expected subset:
ng-repeat="obj in objs | filter:{category:1}"
But when i do this it does not show anything: (search for null instead of 1)
ng-repeat="obj in objs | filter:{category:null}"
This behaviour has been tested in 1.1.1 and 1.0.1 on chrome 23.0.1271.97 and IE9.
Plnkr and jsfiddle demo's:
http://plnkr.co/edit/jgfPPE
http://jsfiddle.net/KQYMY/17/