Skip to content

Commit

Permalink
Merge pull request buhrmi#16 from bricksphd/master
Browse files Browse the repository at this point in the history
Fixing bugs in the todoist example
  • Loading branch information
buhrmi committed Nov 17, 2017
2 parents 7f50ead + 700b199 commit 4e63c46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/app/src/App.vue
Expand Up @@ -6,7 +6,7 @@
<input v-model="message" placeholder="New Todo">
<button @click="$pouch.post('todos', {message: message});message=''">Save Todo</button>
<div v-for="todo in todos">
<input v-model="todo.message" @change="$pouch.put('todos', todo)">
<input v-model="todo.message" @change="$pouch.put('todos', todo, {})">
<button @click="$pouch.remove('todos', todo)">Remove</button>
</div>
</div>
Expand All @@ -22,6 +22,9 @@
created: function() {
// Send all documents to the remote database, and stream changes in real-time
this.$pouch.sync('todos', 'http://localhost:5984/todos');
},
data:function(){
return {message : ""};
}
}
</script>

0 comments on commit 4e63c46

Please sign in to comment.