0
이 코드가 있습니다각도 1.x 인 오브젝트 내부의 배열에 어떻게 액세스합니까?
<div class="list" ng-repeat="key in results">
{{key.locations}}
</div>
JSON
[
{
"locations": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
"imgs": ["111.png", "222.png"]
}
]
JS 내가 루프를 원하는
.controller('ListCtrl', function($scope, $http) {
$http.get("js/data.json").success(function(results) {
$scope.results = results;
});
})
배열 1,2,3 ... 많은 감사 어떤 도움 물마루 ! 처음에 중첩되어
다른'ng-repeat' –
나는 동시에 2 개를 사용할 수 있습니까? – olivier
'결과 [0] .locations'에서 키를 시도한 다음'{{key}}' –