我想知道,我该如何放置一个过滤器ng-repeat,它只会返回具有颜色的项目?我希望在网格上方有一个名为“显示颜色的人”的复选框,它可以在选中时根据颜色数组的数量筛选列表,并在未选中时显示ALL。基于阵列长度的angularjs ng-repeat过滤器
{
"_id": "54d13c3f3c25d5d8123a1d62",
"name": "Barry",
"colours": ["239, 101, 128"]
},
{
"_id": "54d13sfg5d5d8hgf6gg",
"name": "John",
"colours": []
},
{
"_id": "34d13sfg5d5d4tt6g",
"name": "Andrew",
"colours": []
},
{
"_id": "44d165d5d4t77t6g",
"name": "Gary",
"colours": ["25, 234, 22", "5, 100, 255"]
},
这是完美的,谢谢你。我不知道'!'和'!!' – 2015-02-08 20:35:02
不客气:) – tasseKATT 2015-02-08 20:37:44