如何检查集合中angularjs中的非null条件 [英] How to check not null condition in angularjs on a collection

查看:86
本文介绍了如何检查集合中angularjs中的非null条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



有人可以告诉我如何根据对房产的非空检查过滤集合后检索数据。



我能够根据空检查过滤数据

vm.sampledata = $ filter('filter')(vm.data.list,{dueBy:null },真实);



但无法过滤数据而非空列表检查



 vm.sampledata = $ filter('filter')(vm.data.list,{dueBy>:!null},true); 

哪个无效



谢谢。



我的尝试:



 vm.sampledata = $ filter('filter')(vm.data.list,{dueBy:!null},true); 

解决方案

filter('filter')(vm.data.list,{dueBy:null},true);



但无法过滤数据而非空列表检查



 vm.sampledata = 


< BLOCKQUOTE>过滤器(过滤)(vm.data.list,{dueBy>:!null},true);

哪个不工作



谢谢。



我的尝试:



 vm。 sampledata = 


filter('filter')(vm.data.list,{dueBy:!null},true);


Hi Everyone,

Can someone tell me how to retrieve data after filtering the collection based on not null check on a property.

I am able to filter the data based on null check
vm.sampledata= $filter('filter')(vm.data.list, { dueBy: null }, true);

but unable to filter the data with not null check on list

vm.sampledata= $filter('filter')(vm.data.list, { dueBy>: !null }, true);

which is not working

Thanks.

What I have tried:

vm.sampledata= $filter('filter')(vm.data.list, { dueBy: !null }, true);

解决方案

filter('filter')(vm.data.list, { dueBy: null }, true);

but unable to filter the data with not null check on list

vm.sampledata=


filter('filter')(vm.data.list, { dueBy>: !null }, true);

which is not working

Thanks.

What I have tried:

vm.sampledata=


filter('filter')(vm.data.list, { dueBy: !null }, true);


这篇关于如何检查集合中angularjs中的非null条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆