Created
July 20, 2017 21:22
-
-
Save rdegges/696994c35f308ee5df86ca6845603c06 to your computer and use it in GitHub Desktop.
Two-way data binding in Vue.js.
This file contains hidden or 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
<html> | |
<body> | |
<div id="app"> | |
<p>What's your favorite color?</p> | |
<input v-model="color" type="text"> | |
<p>Your favorite color is... {{ color }}</p> | |
</div> | |
<script src="https://unpkg.com/vue"></script> | |
<script> | |
let app = new Vue({ | |
el: "#app", | |
data: { | |
color: '' | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment