-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (33 loc) · 1.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Todo App In Vue</title>
<link rel="stylesheet" href="https://ez-css.now.sh">
<style>
.done {
text-decoration: line-through;
}
</style>
</head>
<body>
<main id="app">
<h3>Todo App In Vue</h3>
<form @submit.prevent="addTodo">
<label for="newTodo">New Todo</label>
<input v-model="newTodo" type="text" name="newTodo" id="newTodo" value="">
<button type="submit" name="button"> Add </button>
</form>
<ul>
<li v-for="todo in todos">
<input type="checkbox" v-model="todo.done">
<span :class="{ done: todo.done }">{{todo.title}}</span>
<button @click="removeTodo(todo)" type="button" name="button">remove todo</button>
</li>
</ul>
</main>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="app.js" charset="utf-8"></script>
</body>
</html>