Created
March 8, 2017 17:20
-
-
Save rpasta42/f5423d51dd20e58650a0e770fc4034bb to your computer and use it in GitHub Desktop.
vuejs example
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
<html> | |
<head> | |
<script src='https://unpkg.com/vue/dist/vue.js'></script> | |
</head> | |
<body> | |
<div id='app'> | |
{{message}} | |
</div> | |
<script> | |
var app = new Vue({ | |
el : '#app', | |
data: { | |
message: 'initial message' | |
} | |
}); | |
function f(i) { | |
app.message = 'counter:' + i + ' date:' + new Date(); | |
setTimeout(function() { | |
f(++i); | |
}, 500*i); | |
} | |
f(0); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment