Commit 50862d03 authored by Pascal Hartig's avatar Pascal Hartig

Merge pull request #784 from andrewwong1221/angular-perf-fix

Fixing Optimized Angularjs's markAll method.
parents f3e41f70 e31fdda2
...@@ -80,7 +80,7 @@ todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, todoStorage, ...@@ -80,7 +80,7 @@ todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, todoStorage,
todos.forEach(function (todo) { todos.forEach(function (todo) {
todo.completed = !completed; todo.completed = !completed;
}); });
$scope.remainingCount = completed ? 0 : todos.length; $scope.remainingCount = completed ? todos.length : 0;
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