1
js`和我想重复的阵列到一个列表使用角度把一个多维数组成多列表
从这: 这是服务:
var Response= [
["Article One"],
["Article Two"],
["Article Three"],
["Article Images", ["Images 1", "Images 2", "Images 3"] ],
["Article Five"]
];
,并呼吁从控制器对象:
$scope.Response = function() {
return ArtikelSucheService.Response;
};
我要重复这样的:
<ul ng-repeat="Article in Response()">
<li>Article One</li>
<li>Article Two</li>
<li>Article Three</li>
<li>Images
<ul ng-repeat="What must stay here?">
<li>Images 1</li>
<li>Images 2</li>
<li>Images 3</li>
</ul>
</li>
<li>Article Five</li>
</ul>
我不知道,我该如何重复数组中的数组。 响应是一个数组。在响应中有x个图像。 1篇文章可以有很多图片。
有人可以帮我吗?
没有必要添加空数组。至少从1.0.4开始,如果源数组未定义,那么ng-repeat将不会执行 –
这不起作用:S – user2038879
http://jsfiddle.net/jw5Qf/1/工作示例 –