87,901
社区成员
发帖
与我相关
我的任务
分享
$scope.title = ['企业数','产值','同比']
$scope.list = [{
d1 : 1,
d2 : 2,
d3 : 3
},{
d1 : 11,
d2 : 22,
d3 : 33
}];
$scope.listData = [];
for(var i=0;i<$scope.list.length;i++){
$scope.listData.push($scope.list[i].d1);
$scope.listData.push($scope.list[i].d2);
$scope.listData.push($scope.list[i].d3);
}
<table>
<tr>
<td ng-repeat="data in listData track by $index">{{title[$index%3]}}</td-repeat>
</tr>
<tr>
<td ng-repeat="data in listData track by $index">{{data}}</td>
</tr>
</table>