Created
March 21, 2017 14:26
-
-
Save ElMatella/3eeb1f124d5982c7154bd4df021e3281 to your computer and use it in GitHub Desktop.
test vue
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
<!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