我正在尝试在我的代码中使用以下数据:
$scope.masterData = {"list": {
"PPP0001188": ["01","02","03"],
"PPP0001189": ["01","02","03"]
}}
我想显示与:
相同的内容PPP0001188:01 02 03
我使用的html如下:
<div ng-repeat="(key,val) in masterData.list">
<div>
<span>{{key}}</span>
<ul class="storeIdList">
<li ng-repeat = "store in {{val}}">
<button class="btn btn-default siteBtns">{{store}}</button>
</li>
</ul>
</div>
</div>
内部ng-repeat循环失败,但如果我填充{{val}},它会返回一个数组。任何人都可以建议正确的语法???
答案 0 :(得分:3)
只需替换
<li ng-repeat = "store in {{val}}">
通过
<li ng-repeat = "store in val">
答案 1 :(得分:0)