Skip to content

Commit

Permalink
Polymer: fixes localstorage, filtering.
Browse files Browse the repository at this point in the history
  • Loading branch information
addyosmani committed Jul 22, 2014
1 parent f2ffd97 commit d3e5743
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions architecture-examples/polymer/elements/td-model.html
Expand Up @@ -9,15 +9,16 @@
allCompleted: false,
ready: function() {
this.asyncMethod(function() {
this.items = this.items || [];
this.items = this.storage.value || [];
});
},
filterChanged: function() {
this.filterItems();
this.asyncMethod(function() {
this.filterItems();
});
},
itemsChanged: function() {
this.completedCount =
this.items.filter(this.filters.completed).length;
this.completedCount = this.items.filter(this.filters.completed).length;
this.activeCount = this.items.length - this.completedCount;
this.allCompleted = this.completedCount && !this.activeCount;
this.filterItems();
Expand Down

0 comments on commit d3e5743

Please sign in to comment.