angularjs - ng-table cannot change column value -
getting head around ng-table in particular editable grid. trying alter column value in info object in row. value in column not updated? in seteditid function on controller $scope.data object seems unchanged after edit:
$scope.seteditid = function (pid) { $scope.editid = pid; } how $scope.data object updated after editing?
plunkr ref:http://plnkr.co/edit/evfyvm
you're displaying models value via html "value" attribute. alter model itself, have create utilize of ngmodel directive.
to maintain save , cancel functionality, i'd advise create working re-create in $scope.edit using angular.copy() of model p , save after clicking save - though, can't overwrite model re-create itself, have write every single attribute.
e.g.:
p.ln = $scope.edit.ln; ... instead of:
p = $scope.edit; see: http://plnkr.co/edit/rjdee3
angularjs ngtable
No comments:
Post a Comment