Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angularjs ng-repeat filter not equal to

When I tried using the below syntax, it doesn't filter or doesn't exclude:-

ng-repeat = "option in vm.eesSettingIdOptions | filter : { SettingID: '!vm.eesAdminSetupData.SettingID'}

but it do works when I change it to:-

ng-repeat = "option in vm.eesSettingIdOptions | filter : { SettingID: '!51'}

they should be the same isn't it?

like image 656
Roel Avatar asked Sep 23 '15 12:09

Roel


1 Answers

you should put your variable out of the quotes:

ng-repeat="option in vm.eesSettingIdOptions | filter:{ SettingID: '!' + vm.eesAdminSetupData.SettingID}
like image 198
z0r0 Avatar answered Sep 21 '22 09:09

z0r0