Closed Tilican closed 8 years ago
Thanks for reporting the issue and for providing a patch.
@deontologician does this look like the right fix?
It looks like this is from the todo-angular-express
and todo-angular-express-promise
directories getting out of sync. This issue is found in the promise example, but not in the other one.
In the non-promise version, we have:
$scope.clearCompletedTodos = function () {
$scope.todos.forEach(function (todo) {
if(todo.completed) {
$scope.removeTodo(todo);
}
});
};
which is a little cleaner I think
I went ahead and made the change in 6600248
Thanks again @Tilican :)
Hello,
On your example todo with angular and promise, the clearCompletedTodos have a little mistake !
Angular don't know todos and todos are not delete from DB ...
Have to change this to
Bye and thx for this example :+1: