我想知道,我該如何放置一個過濾器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