Angular-XEditable自动保存数据

时间:2016-03-04 16:47:33

标签: angularjs

我使用了选项

buttons="no"

要从文本框中删除按钮,但现在没有任何内容被保存。如何将其保存到模型中(可能在我更改焦点时?)并调用范围方法。

1 个答案:

答案 0 :(得分:0)

I found this solution, it might benefit someone, although this is the first time using angular so its properly no the best;

e-ng-blur="saveName($data, entry)"


$scope.saveName = function(data, entry) {
    entry.name = data;
    return $http.post('/api/update/entry/', {name: data, id: entry.id})
  }