-
-
Save kevinnio/a6177b9d4f2c39920a0f4e53ae6b0fdc 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
<div id="counter-app" style="text-align: center"> | |
<h3>{{ counter }}</h3> | |
<span> | |
Increment by <input type="number" v-model="increment" /> | |
</span> | |
<button v-on:click="counter += parseInt(increment)">Count up!</button> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/vue"></script> | |
<script> | |
new Vue({ | |
el: '#counter-app', | |
data: { counter: 0, increment: 1 } | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment