Skip to content

Instantly share code, notes, and snippets.

@victorlucss
Created October 17, 2018 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victorlucss/2a7d6ddccb1fc0c3076a851628942f1f to your computer and use it in GitHub Desktop.
Save victorlucss/2a7d6ddccb1fc0c3076a851628942f1f to your computer and use it in GitHub Desktop.
<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