我尝试使用ng-repeat
遍历四个级别,但ng-repeat
在第三级之后失败。
如何将ng-repeat
用于多次重复?
<tbody ng-repeat="company in companies">
<tr>
<td>{{company.name}}</td>
</tr>
<tr ng-repeat-start="child in company.Children">
<td>{{child.name}}</td>
</tr>
<tr ng-repeat-start="child2 in child.Children">
<td>{{child2.name}}</td>
</tr>
<tr ng-repeat-end ng-repeat="child3 in child2.Children">
<td>{{child3.name}}</td>
</tr>
<tr ng-repeat-end></tr>
</tbody>
我试图像这样结束两个循环:
<tr ng-repeat-end></tr>
<tr ng-repeat-end></tr>
然而,Angular并不检查必须关闭两个循环。你只能关闭一个循环,这就是我的问题。