Commit eaf7c3a4 authored by Rosana Ruiz's avatar Rosana Ruiz Committed by Pascal Hartig

Fix bug: Show all items when "All" tab is active

parent d692aa3f
......@@ -129,7 +129,7 @@ var todos;
TodoCtrl.prototype.onPath = function (path) {
this.$scope.statusFilter = (path === '/active') ?
{ completed: false } : (path === '/completed') ?
{ completed: true } : null;
{ completed: true } : {};
};
TodoCtrl.prototype.onTodos = function () {
this.$scope.remainingCount = this.filterFilter(this.todos, { completed: false }).length;
......
......@@ -52,7 +52,7 @@ module todos {
onPath(path: string) {
this.$scope.statusFilter = (path === '/active') ?
{ completed: false } : (path === '/completed') ?
{ completed: true } : null;
{ completed: true } : {};
}
onTodos() {
......
......@@ -10,8 +10,8 @@ module todos {
doneCount: number;
allChecked: boolean;
reverted: boolean;
statusFilter: { completed: boolean; };
statusFilter: { completed?: boolean };
location: ng.ILocationService;
vm: TodoCtrl;
}
}
\ No newline at end of file
}
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