Angularjs 如何在angular js中重复表中的行
下面是我在php中使用的代码Angularjs 如何在angular js中重复表中的行,angularjs,angular1.6,Angularjs,Angular1.6,下面是我在php中使用的代码 @for($i= 0; $i < 15; $i++) <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td&g
@for($i= 0; $i < 15; $i++)
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
@endfor
请帮我解决这个问题。感谢ng repeat接受一个数组,您提供了一个值
$scope.other\u line=15代码>。
ng重复运行数组中的代码。长度次
所以你的代码应该是
$scope.other_line = [];
$scope.other_line.length = 15;
<div ng-repeat="rows in other_line">
<td></td
</div>
$scope.other_line=[];
$scope.other_line.length=15;
将other_行
设为15个项目的数组。例如,$scope.other_line=new Array(15)
,ng repeat=“other_line track by$index中的行”
的可能副本应作为副本关闭。
$scope.other_line =15;
$scope.other_line = [];
$scope.other_line.length = 15;
<div ng-repeat="rows in other_line">
<td></td
</div>
<div ng-repeat="rows in other_line">
<td></td
</div>
<div ng-repeat="rows in other_line">
<td></td
</div>
<div ng-repeat="rows in other_line">
<td></td
</div>
.
.
.
.
<div ng-repeat="rows in other_line">
<td></td
</div>