当我使用xeditable将表的编辑值保存到服务器端时," onaftersave"被调用两次,因为两个相同类型的ajax调用正在命中服务。我正在使用" $ submit"在保存按钮和" onaftersave"在表格表格中。任何帮助都可以解决我的问题。提前致谢!
<form editable-form name="vm.weektableform" onaftersave="vm.saveTable()" oncancel="vm.cancelTable()">
<table>
<tbody ng-repeat="row in data">
<tr>
<td >
<span editable-number="row.dayPack" e-form="vm.weektableform" onbeforesave="vm.checkNumber(row,row.dayPack,$data)"">{{row.dayPack}}</span></td></tr>
</tbody>
</table>
</form>
<button class="saveButton" data-ng-click="vm.weektableform.$submit()">Save</button>