Angular 重复是否有可能实现这一点?基本上我想知道有没有办法将 2 循环在一起?非常感谢任何帮助!
Controller :
$scope.date=[
{ID:1,Date:'2016-11-12'},
{ID:2,Date:'2016-11-15'},
{ID:3,Date:'2016-12-06'}
]
HTML:
<table border="1" align="center">
<tr>
<th rowspan="2">ITEMCODE</th>
<th rowspan="2">DEBTORCODE</th>
<th colspan="2" ng-repeat="d in date">{{d.Date}}</th>
</tr>
<tr>
<th>Bal</th>
<th>Order</th>
</tr>
</table>
最佳答案
您可以使用 Angular 1.2 中引入的 ng-repeat-start 和 ng-repeat-end
<th ng-repeat-start="d in date">Bal</th>
<th ng-repeat-end>Order</th>
关于javascript - 如何使两列重复列表中的一项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41061663/