Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vue.component('my-counter', {
- data () {
- return {
- count: 0
- }
- },
- methods: {
- add () {
- this.count += 1;
- }
- },
- template: `<div>
- <div>{{ count }}</div>
- <button @click="add()">Increment</button>
- </div>`
- }
- });
Add Comment
Please, Sign In to add comment