중첩 된 개체 속성을 반복하고 순서를 지정하려했지만 순서가 작동하지 않습니다.AngularJs ng-repeat order 중첩 된 개체 속성에 대해 작동하지 않습니다.
내가 본 적이 : How to orderby in AngularJS using Nested property
하지만 JSON 구조가 다르기 때문에 내가 그것을 작동시킬 수 없습니다.
내 코드 :
<div ng-repeat="item in data | orderBy:order.allListPosition">
<div>{{item.name}} - {{item.order}}</div>
</div>
범위 :
$scope.data = {
"78962": {
"id": "78962",
"name": "item 2",
"type": "blind",
"order": {
"allListPosition": "008",
"catListPosition": "059"
},
"data": {
"status": "stop",
"percent": 20
},
"longPress": {
"item": "78966",
"active": true
}
},
"78963": {
"id": "78963",
"name": "item 3",
"type": "coolmaster",
"order": {
"allListPosition": "053",
"catListPosition": "001"
},
"data": {
"status": 1,
"temp": 16,
"point": 25,
"mode": "cool",
"fan": 3
},
"longPress": {
"item": "78966",
"active": false
}
}
};
사람이 내가 잘못하고있는 무슨 나를 보여 주시겠습니까?
감사의 많이
아비
사용 해 orderBy : 'order.allListPosition' – pixelbits