The bug is here: $scope.todoCompleted = function (todo) { $scope.remainingCount += todo.completed ? -1 : 1; todoStorage.put(todos); }; Changed to this and the application works:
$scope.todoCompleted = function (todo) { $scope.remainingCount += todo.completed ? 1 : -1; todoStorage.put(todos); };
The bug is here:
$scope.todoCompleted = function (todo) {
$scope.remainingCount += todo.completed ? -1 : 1;
todoStorage.put(todos);
};
Changed to this and the application works:
$scope.todoCompleted = function (todo) {
$scope.remainingCount += todo.completed ? 1 : -1;
todoStorage.put(todos);
};