Commit e31fdda2 authored by Andrew D. Wong's avatar Andrew D. Wong

Angular-perf: Fixing conditional that causes the "Clear completed" button to...

Angular-perf: Fixing conditional that causes the "Clear completed" button to be enabled at the wrong time.
parent f3e41f70
......@@ -80,7 +80,7 @@ todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, todoStorage,
todos.forEach(function (todo) {
todo.completed = !completed;
});
$scope.remainingCount = completed ? 0 : todos.length;
$scope.remainingCount = completed ? todos.length : 0;
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