Skip to content

Instantly share code, notes, and snippets.

@jasperf
Created December 24, 2017 07:10
Show Gist options
  • Save jasperf/63f7cce8c50b8573b9179c0cff560722 to your computer and use it in GitHub Desktop.
Save jasperf/63f7cce8c50b8573b9179c0cff560722 to your computer and use it in GitHub Desktop.
VueJS v-model example
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="root">
<input type="text" name="input" v-model="message">
<p>The value of the input is {{message}}</p>
</div>
<script src="https://unpkg.com/vue"></script>
<script>
let data = {
message: 'Hello World'
};
new Vue({
el: '#root',
data:data
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment