ng-repeat를 사용하여 서비스에서받은 객체의 특정 요소를 표시하려고합니다. {{account}}을 사용하면 모든 요소를 렌더링하지만 예를 들어 {{account.idType}}을 시도하면 아무 것도 표시되지 않습니다. 무슨 일이야? 여기 내 HTMLng-repeat는 객체를 표시하지만 객체는 표시하지 않습니다.
<table>
<thead>
<tr>
<th>List of Accounts</th>
</tr>
</thead>
<tbody ng-repeat="account in accounts" ng-if="account.idType != 0">
<tr>
<td>{{account.idType}}</td>
<td>{{account.linkRel}}</td>
<td>{{account.linkURI}}</td>
<td><input type="button" ng-click="editAccount(account.idType)" value="edit"></td>
</div>
이며,이 컨트롤러입니다 : $resource
가 비동기
{"linklist":[{"idType":"0","linkRel":"Get all accounts","linkType":"Sibling","linkURI":"http://localhost:8085/WSAT/account","linkVerb":"GET"},{"idType":"0","linkRel":"Create a new account","linkType":"Sibling","linkURI":"http://localhost:8085/WSAT/account","linkVerb":"POST"},{"idType":"7","linkRel":"try","linkType":"Child","linkURI":"http://localhost:8085/WSAT/account/7","linkVerb":"GET"},{"idType":"9","linkRel":"try234","linkType":"Child","linkURI":"http://localhost:8085/WSAT/account/9","linkVerb":"GET"}]}
에 의해
$scope.accounts = Account.get()
를 교체 당신은 엔드 포인트에서 응답 객체를 게재 할 수 있습니까? 반환 된 것을 보지 않고도 문제를 해결하기가 어렵습니다. – user2263572