我有一个基于我的控制器模型动态定义的dataTable,如下所示:
<tbody>
<tr ng-repeat="rec in grid.records">
<td ng-repeat="col in grid.columns"
ng-init="value=rec[col.name]">
<span ng-model="rec[col.name]">{{value}}</span>
</td>
</tr>
</tbody>
为什么在模型更改时不更新dataTable列值?
答案 0 :(得分:1)
试试这个:
<tbody>
<tr ng-repeat="rec in grid.records">
<td ng-repeat="col in grid.columns">
<span>{{rec[col.name]}}</span>
</td>
</tr>
</tbody>