This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-01-19 lists-cond-01-st.../index.html

35 lines
1.2 KiB
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-goals">
<h2>My course goals</h2>
<input type="text" v-model="enteredGoalValue" />
<button @click="addGoal">Add Goal</button>
<p v-if="goals.length === 0">No goals have been added yet - please start adding some!</p>
<ul>
<li v-for="(goal, index) in goals" :key="goal" @click="removeGoal(index)">
<p>{{ goal }} - {{ index }}</p>
<input type="text" @click.stop>
</li>
<!-- <li v-for="(value, key, index) in {name: 'Max', age: 32}">{{ value }} - {{ key }} - {{ index }}</li>
<li v-for="num in 10">{{ num }}</li> -->
</ul>
</section>
</body>
</html>