-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
34 lines (28 loc) · 1.05 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>NG-Todo</title>
<link rel="stylesheet" href="styles.css">
</head>
<body ng-app="todoList" ng-controller="todoCtrl">
<h1>Basic Todo-List</h1>
<form ng-submit="addTodo()">
<input type="text" ng-model="todoInput" size="50" placeholder="Add New">
<input type="submit" value="Add New">
</form>
<br>
<div ng-repeat="item in todoList">
<div ng-class="item.done ? 'done' : 'no-done'" class="todo-item">
<input type="checkbox" ng-checked="item.done" ng-click="toggleTodo(item)">
<span ng-bind="item.todoText"></span>
<button ng-click="removeTodo(item)">X</button>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.14/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.14/angular-animate.js"></script>
<script src="script.js"></script>
</body>
</html>