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