Skip to content

Instantly share code, notes, and snippets.

@rpasta42
Created March 8, 2017 17:20
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 rpasta42/f5423d51dd20e58650a0e770fc4034bb to your computer and use it in GitHub Desktop.
Save rpasta42/f5423d51dd20e58650a0e770fc4034bb to your computer and use it in GitHub Desktop.
vuejs example
<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