Commit 312a7c2d authored by Pascal Hartig's avatar Pascal Hartig

Merge pull request #1538 from dmethvin/795-angularjs-perf

angularjs-perf: Fix the "mark all complete" checkbox
parents d09aa978 9e2f8718
...@@ -85,9 +85,9 @@ todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, $filter, tod ...@@ -85,9 +85,9 @@ todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, $filter, tod
$scope.markAll = function (completed) { $scope.markAll = function (completed) {
todos.forEach(function (todo) { todos.forEach(function (todo) {
todo.completed = !completed; todo.completed = completed;
}); });
$scope.remainingCount = completed ? todos.length : 0; $scope.remainingCount = completed ? 0 : todos.length;
todoStorage.put(todos); 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