有没有办法用angular ui的可排序设置回调函数?我想将 ng-update="foo()" 添加到下面的 tbody 标记中,并在列表更改时运行 foo 。
<tbody id="existingStockResults" ui-sortable ng-model="processes">
<tr ng-repeat="process in processes" ng-class="{odd: $index%2 == 0, even: $index%2 != 0}">
<td>{{process.process}}</td>
<td>{{process.vendor}}</td>
<td>{{process.desc}}</td>
<td>{{process.cost}}</td>
<td><a href="#" ng-click="editProcess($index)">edit</a></td>
<td><a href="#" ng-click="removeProcess($index)">remove</a></td>
</tr>
</tbody>
谢谢!