Getting my head around the ng-table in particular for the editable grid. Trying to change a column value in the data object in any row. However the value in the column does not get updated? In the setEditId function on the controller the $scope.data object seems to be unchanged after an edit:
$scope.setEditId = function (pid) {
$scope.editId = pid;
}
How to get the $scope.data object updated after editing?
Plunkr ref:http://plnkr.co/edit/EVfyVm
You're actually displaying the models value via the html "value" attribute. To change the model itself, you have make use of the ngModel directive.
To keep save and cancel functionality, I'd advise to make a working copy in $scope.edit using angular.copy() of the model p and save it back after clicking save - though, you can't just overwrite the model with the copy itself, you have to write back every single attribute.
e.g.:
p.ln = $scope.edit.ln;
...
Instead of:
p = $scope.edit;