Created
November 28, 2017 15:36
-
-
Save paveltimofeev/89d7bcc9ed0da51b8f9559a1971009d2 to your computer and use it in GitHub Desktop.
VueJS Scaffolding
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> | |
<head> | |
<script src="https://unpkg.com/vue"></script> | |
</head> | |
<body> | |
<div id="app" v-on:click="sayHello('John', $event)"> | |
{{ message }} | |
</div> | |
<br><small><i><a href="https://vuejs.org/v2/guide/">https://vuejs.org/v2/guide/</a></i></small> | |
</body> | |
<script> | |
var app = new Vue({ | |
el: '#app', | |
data: { | |
message: 'Click on me!' | |
}, | |
methods: { | |
sayHello: function( name ){ | |
app.message = 'Hello, ' + name + ' ^.^ !'; | |
} | |
} | |
}) | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment