Skip to content

Commit

Permalink
Step 5 | Persist modifications in local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
amahdy committed Mar 30, 2017
1 parent f6e6c48 commit 9aba643
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/offline-first-app/offline-first-app.html
Expand Up @@ -143,6 +143,13 @@ <h3>Editor</h3>
this.selected.firstName = this.$.firstName.value;
this.selected.lastName = this.$.lastName.value;
this.selected.email = this.$.email.value;

this.localDB.put(this.selected).then(response => {
this.allDocs[this.selected.id].value.rev = response.rev;
this.selected._rev = response.rev;

this.$.lazyGrid.refreshItems();
});
},

});
Expand Down

0 comments on commit 9aba643

Please sign in to comment.