javascript - ng-repeat checkbox updation into database -
angular code
$scope.deltodo=function() { $http.post('delete.php',{ stus:$scope.delstatus, }).then(function(data,status,headers,config) { }); };
html code
<li ng-repeat="todo in todocontent track $index"> <p class="cls-{{todo.inc_id}}">{{todo.todoname}}</p> <input type="checkbox" ng-model="$parent.delstatus" ng-click="deltodo()" ng-true-value="'{{todo.inc_id}}'" ng-false-value="'{{todo.inc_id}}'" /> </li>
i want update database if checkbox checked or unchecked , when checkbox checked css of specified text changed automatically. checkboxes in ng-repeat
loop.
problem - if ng-model
of checkbox same checkbox checked .in case database updation work fine. if change ng-model
correct css part updation of database not work.
Comments
Post a Comment