我希望hiddenVal中的ng-init值类似于stus
$scope.delTodo = function(id) {
$http.post('delete.php', {
stus: $scope.delstatus,
hiddenVal: $scope.hidn
}).then(function(data, status, headers, config) {
//$scope.todocontent = response.data;
});
};
** HTML code **
<li ng-repeat="todo in todocontent track by $index">
<p class="cls-{{todo.inc_id}}">{{todo.todoName}}</p>
<input type="checkbox" ng-model="$parent.delstatus" ng-click="delTodo(todo)" ng-true-value="'{{todo.inc_id}}'" ng-false-value="'{{todo.inc_id}}'" />
<input ng-model="hidn" ng-init="hidn='{{inc_id}}'" type="hidden" name="fname" >{{hidn}}
</li>