Created
October 17, 2018 16:34
-
-
Save victorlucss/2a7d6ddccb1fc0c3076a851628942f1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://unpkg.com/vue"></script> | |
<div id="app"> | |
<h1>{{ count }}</h1> | |
<button v-on:click="increment()">Add one</button> | |
</div> | |
<script> | |
new Vue({ | |
el: '#app', | |
data: { | |
count: 0 | |
}, | |
methods: { | |
increment(){ | |
this.count += 1 | |
} | |
}, | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment