从服务器获取一个数组:
需要显示:这样的信息
<div class="object1">
<div class="content"></div>
<div class="content"></div>
<div class="content"></div>
</div>
<div class="object2">
<div class="content"></div>
<div class="content"></div>
</div>
现在它的工作原理如下:
<div class="object1">
<div class="content"></div>
</div>
<div class="object1">
<div class="content"></div>
</div>
<div class="object2">
<div class="content"></div>
</div>
<div class="object2">
<div class="content"></div>
</div>
我的ng-repeat:
<div class="feedback-container">
<div ng-repeat="feedback in datasfeed | filter:keyword.classname " >
{{feedback.id}}
<div ng-repeat="content in feedback.content" class="feedback-row gt-clear group group-content" >
<div class="gt-left">
<div class="ava-round-small"><img src="{{content.user_avatar}}"></div>
</div>
</div>
</div>
</div>
那么如何改变它将被设置的代码我需要什么?
答案 0 :(得分:2)
我会这样做
<div class="feedback-container">
<div ng-repeat-start="feedback in datasfeed | filter:keyword.classname " >
{{feedback.id}}
</div>
<div ng-repeat-end ng-repeat="content in feedback.content" class="feedback-row gt-clear group group-content" >
<div class="gt-left">
<div class="ava-round-small"><img src="{{content.user_avatar}}"></div>
</div>
</div>
</div>