Skip to content

Instantly share code, notes, and snippets.

@slmanju
Created August 2, 2018 06:16
Show Gist options
  • Save slmanju/a734e9c561e44d5ead7e59e777dcbd2f to your computer and use it in GitHub Desktop.
Save slmanju/a734e9c561e44d5ead7e59e777dcbd2f to your computer and use it in GitHub Desktop.
<template>
<div id="todo" class="box">
<div>
<label for="title">Title</label>
<input type="text" id="title" v-model="title" />
</div>
<div>
<label for="description">Description</label>
<input type="text" id="description" v-model="description" />
</div>
<div>
<button @click="save">Add</button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
title: '',
description: ''
}
},
methods: {
save() {
console.log(this.title, this.description);
this.title = '';
this.description = '';
}
}
}
</script>
<style>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment