Skip to content

Instantly share code, notes, and snippets.

@ElMatella
Created March 21, 2017 14:26
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 ElMatella/3eeb1f124d5982c7154bd4df021e3281 to your computer and use it in GitHub Desktop.
Save ElMatella/3eeb1f124d5982c7154bd4df021e3281 to your computer and use it in GitHub Desktop.
test vue
<!DOCTYPE html>
<html>
<head>
<title>Test VueJS</title>
</head>
<body>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<div id="app">
<form @submit.prevent="doSomething()">
<input type="email" v-model="email" name="email">
<input type="password" name="password">
<input type="submit" value="send">
</form>
{{ email }}
</div>
<script type="text/javascript">
new Vue({
el: '#app',
data: {
email: ''
},
method: {
doSomething() {
alert(this.email)
}
}
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment