Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
Last active May 28, 2023 15:01
Show Gist options
  • Save JeffreyWay/0d7d2cd0086fcc9f5569fbe44afab5cc to your computer and use it in GitHub Desktop.
Save JeffreyWay/0d7d2cd0086fcc9f5569fbe44afab5cc to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Episode 1: The Absolute Basics</title>
<script src="https://unpkg.com/vue@3"></script>
</head>
<body>
<div id="app">
<p>
<input type="text" v-model="greeting">
</p>
<p>
{{ greeting }} ({{ greeting.length }})
</p>
</div>
<script>
Vue.createApp({
data() {
return {
greeting: 'What is up'
};
},
mounted() {
setTimeout(() => {
this.greeting = 'Changed';
}, 3000);
}
}).mount('#app');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment