JSFiddle
我无法访问嵌套集合中的数组图像.为什么我看不到任何输出?
该模型:
var obj = [{ "id": "7","date": "1 Jan","images": ["507f42c682882","507e24b47ffdb","507e2aeca02d5","507e2b19663a9"] },{ "id": "7","507e2b19663a9"] }];
这是带有ng-repeat的HTMl:
<ul> <li ng-repeat="img in item"> <br /> <li ng-repeat="img1 in img.images">{{img1}}</li> </li> </ul>
任何人都能指出我错过的东西吗?
问题是你试图在li元素中重复一个li元素列表,这是无效的HTML.因此,角度不会呈现这一点.
将您的HTML更新为:
<ul> <li ng-repeat="img in item"> <ul> <li ng-repeat="img1 in img.images">{{img1}}</li> </ul> </li> </ul>