2015-07-20 70 views

回答

1

事情是這樣的:

<tr ng-repeat="num in [1, 2, 3, 4, 5, 6]"> 
    <td ng-bind="num"></td> 
</tr> 

當然你可以聲明數組在你的控制器:

$scope.numbers = [1, 2, 3, 4, 5, 6]; 

然後用:

<tr ng-repeat="num in numbers"> 
    <td ng-bind="num"></td> 
</tr>