用于填充表的倍数ng-repeat
16lz
2021-01-22
Im trying to populate the same table with values from different scope variables. The A and B will always have the same lenght.
我试图用不同范围变量的值填充同一个表。 A和B总是具有相同的长度。
$scope.a = [1,2,3]
$scope.b = [4,5,6]
<table>
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="itemA in a, itemB in b"> <!-- How should be this ng-repeat?-->
<td>{{itemA}}</td>
<td>{{itemB}}</td>
</tr>
</tbody>
</table>
更多相关文章
- 在JavaScript中访问PHP变量[重复]
- 如何使用Knockout从vm设置会话变量?
- js闭包与变量
- 获取JavaScript数组元素的最大长度
- JavaScript声明全局变量三种方式的异同
- 父范围中的变量不会在匿名函数中被更改[重复]
- 传递变量以便以角度移动子弹
- 在变量名是字符串时声明变量?
- 如何将变量推送到web客户端以获取ajax?