commit | author | age
|
38b8f3
|
1 |
<!DOCTYPE html> |
CM |
2 |
<html lang="en"> |
|
3 |
<head> |
|
4 |
<meta charset="UTF-8" /> |
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|
6 |
<title>Vue Basics</title> |
|
7 |
<link |
|
8 |
href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" |
|
9 |
rel="stylesheet" |
|
10 |
/> |
|
11 |
<link rel="stylesheet" href="styles.css" /> |
|
12 |
<script src="https://unpkg.com/vue@3.4.9/dist/vue.global.js"></script> |
|
13 |
<script src="app.js" defer></script> |
|
14 |
</head> |
|
15 |
<body> |
|
16 |
<header> |
|
17 |
<h1>Vue Course Goals</h1> |
|
18 |
</header> |
|
19 |
<section id="user-goals"> |
|
20 |
<h2>My course goals</h2> |
f8f722
|
21 |
<input type="text" v-model="enteredGoal" /> |
38b8f3
|
22 |
<button @click="addGoal">Add Goal</button> |
f8f722
|
23 |
<p v-if="goals.length === 0"> |
CM |
24 |
No goals have been added yet - please start adding some! |
|
25 |
</p> |
38b8f3
|
26 |
<ul v-else> |
f8f722
|
27 |
<li v-for="(goal, i) in goals">{{i}} - {{goal}}</li> |
38b8f3
|
28 |
</ul> |
f8f722
|
29 |
<!-- <ul> |
CM |
30 |
<li v-for="(value, key) in {nome: 'cristiano', cognome: 'magro'}">{{key}}: {{value}}</li> |
|
31 |
</ul> --> |
38b8f3
|
32 |
</section> |
CM |
33 |
</body> |
|
34 |
</html> |