2
我有一個資源檢查,如果一個資源的ID是在所顯示的另一個資源的ID列表NG-重複
$scope.list = [
{ listId:1, name: "Test1" },
{ listId:2, name: "Test 2" }
];
我也有一個其他資源引用的第一個與listId
$scope.includedList = [
{
includedListId:1,
title: "Title 1",
listId:1
}];
我重複顯示,我想檢查列表項是否包含在第二個資源中。
< a ng-repeat="item in list"
ng-class="selected if item is included in includedList"
>
在'$ scope.list'中,您確定您有兩種不同的項目類型? 'id'和'listId' – 2015-03-19 13:01:30
現在修正了錯字。 – Iezekiel 2015-03-19 13:03:27