Skip to content

Instantly share code, notes, and snippets.

@victorlucss
Last active October 25, 2018 20:37
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/04cea9347a284db7983d75a75040d37a to your computer and use it in GitHub Desktop.
Save victorlucss/04cea9347a284db7983d75a75040d37a to your computer and use it in GitHub Desktop.
<script src="https://unpkg.com/vue"></script>
<div id="app">
<h1>{{ contar }}</h1>
<button v-on:click="incrementar()">Adicionar um</button>
</div>
<script>
new Vue({
el: '#app',
data: {
contar: 0
},
methods: {
incrementar(){
this.contar += 1
}
},
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment