由网友(誓言再美也不过是谎言)分享简介:的jsfiddle 我不能够访问嵌套集合中的阵列的图像。为什么我不能看到任何输出?I'm not able to access the array images in the nested collection. Why am I not able to see any output?模型:var ob...
的jsfiddle
我不能够访问嵌套集合中的阵列的图像。为什么我不能看到任何输出?
I'm not able to access the array images in the nested collection. Why am I not able to see any output?
模型:
var obj = [{
"id": "7",
"date": "1 Jan",
"images": ["507f42c682882", "507e24b47ffdb", "507e2aeca02d5", "507e2b19663a9"]
}, {
"id": "7",
"date": "1 Jan",
"images": ["507f42c682882", "507e24b47ffdb", "507e2aeca02d5", "507e2b19663a9"]
}];
这是NG-重复的HTML:
This is the HTMl with ng-repeat:
<ul>
<li ng-repeat="img in item">
<br />
<li ng-repeat="img1 in img.images">{{img1}}</li>
</li>
</ul>
任何人都可以点我很想念我?
Can anyone point me to what I'm missing?
推荐答案
问题是你试图重复里的列表的里
元素,它是无效的HTML。因此,角将不会呈现这一点。
The problem is you are trying to repeat a list of li
elements inside of a li
element, which is invalid HTML. As such, angular will not render this.
更新您的HTML:
<ul>
<li ng-repeat="img in item">
<ul>
<li ng-repeat="img1 in img.images">{{img1}}</li>
</ul>
</li>
</ul>
相关推荐
最新文章