-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
54 lines (45 loc) · 1.79 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
45
46
47
48
49
50
51
52
53
54
<!doctype html>
<html ng-app="todoApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Todo application">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Todo List</title>
<link rel="stylesheet" href="assets/css/app.css">
</head>
<body>
<section>
<header>
<h1>Todo List</h1>
</header>
<article ng-controller="TodoListController as todoList">
<p>You have {{todoList.todos.length}} items in your todo list.
{{todoList.uncompleted()}} have not been completed.</p>
<ul data-ref="todoList">
<li class="list-group-item" ng-repeat="todo in todoList.todos">
<input type="checkbox" ng-model="todo.done">
<span class="done-{{todo.done}}">{{$index}} - {{todo.text}}</span>
</li>
</ul>
<form name="form" ng-submit="todoList.addTodo()" data-ref="todoForm">
<label for="todoText">Add a new todo:</label>
<input type="text" name="todoText" placeholder="Todo"
ng-model="todoList.newItem.text" required ng-minlength="2">
<span ng-show="form.todoText.$error.required">Required</span>
<span ng-show="form.todoText.$error.minlength">Minimum length is 2</span>
<input type="submit" value="Add Todo" ng-disabled="form.$invalid">
</form>
<div>
<input type="button" value="Reset" ng-click="todoList.reset()"></input>
</div>
<div>
<input type="button" value="Clear" ng-click="todoList.clear()"></input>
</div>
</article>
</section>
<script src="assets/js/angular/angular.js"></script>
<script src="assets/js/angular-route/angular-route.js"></script>
<script src="./app/app.js"></script>
</body>
</html>