Commit 401846de authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #637 from Roland1975/gh-pages

refactor to reflect logic on line 62
parents b299ed35 f3a07193
......@@ -65,11 +65,7 @@ todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, todoStorage,
};
$scope.todoCompleted = function (todo) {
if (todo.completed) {
$scope.remainingCount--;
} else {
$scope.remainingCount++;
}
$scope.remainingCount += todo.completed ? -1 : 1;
todoStorage.put(todos);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment