index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue Basics</title>
<link
href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles.css" />
<script src="https://unpkg.com/vue@next" defer></script>
<script src="app.js" defer></script>
</head>
<body>
<header>
<h1>Vue Course Goals</h1>
</header>
<section id="user-goal">
<h2>My Course Goal</h2>
<p>{{courseGoal}}</p>
<p>Learn more about <a v-bind:href='fbLink'>Vue</a></p> /***
</section>
</body>
</html>
What you should keep in mind – /***
app.js
const app = Vue.createApp({
data() {
return{
courseGoal : 'Learning Javascript & Vue!',
fbLink : 'https://www.udemy.com/course/vuejs-2-the-complete-guide/learn/lecture/21463140#overview' /***
}
}
});
app.mount('#user-goal');
WHY V-Bind Method Needed?
{{courseGoal}} stays between <p> & </p>
‘fbLink’ stays inside <a v-bind:href>