I've noticed other peoples' responses to use $parent due to scope. I've tried that but for some reason it doesn't always get fired even with that. When the status becomes active, the event might get fired or doesn't. If I toggle the last one in the list, it does not fire.
controller:
$scope.checkAndSave = function(todo, checked) { $scope.save(todo); }; html:
<li ng-repeat="todo in todos | filter:statusFilter track by $index" ng-class="{completed: todo.completed, editing: todo == editedTodo}"> <div class="view"> <input class="toggle" type="checkbox" ng-model="todo.completed" ng-click="checkAndSave(todo)"> <label ng-dblclick="edit(todo)">{{todo.title}}</label> <button class="destroy" ng-click="remove(todo)"></button> </div> </li>
ng-changeinstead ofng-click