<!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@3.4.9/dist/vue.global.js"></script>
|
<script src="app.js" defer></script>
|
</head>
|
<body>
|
<header>
|
<h1>Vue Course Goals</h1>
|
</header>
|
<section id="user-goals">
|
<h2>My course goals</h2>
|
<input type="text" v-model="enteredGoal" />
|
<button @click="addGoal">Add Goal</button>
|
<p v-if="goals.length === 0">
|
No goals have been added yet - please start adding some!
|
</p>
|
<ul v-else>
|
<li v-for="(goal, idx) in goals" @click="removeGoal(idx)">{{idx}} - {{goal}}</li>
|
</ul>
|
<!-- <ul>
|
<li v-for="(value, key) in {nome: 'cristiano', cognome: 'magro'}">{{key}}: {{value}}</li>
|
</ul> -->
|
</section>
|
</body>
|
</html>
|