-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
50 lines (39 loc) · 1.48 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>To Do Or Not To Do</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.js"></script>
<script src="js/app.js"></script>
<script src="js/TodosController.js"></script>
<link rel="stylesheet" href="css/style.css">
</head>
<body ng-app="todoApp">
<div class="wrapper" ng-controller="TodosController">
<header>
<h1>YOU'VE GOT {{ remainingTodos().length }} THINGS TO DO!</h1>
<h4>{{ completedTodos().length }} things completed | {{ remainingTodos().length }} things remaining</h4>
</header>
<main>
<!-- begin add new todo -->
<form class="add-todo" ng-submit="addTodo()">
<input class="text-box" type="text" placeholder="I need to..." ng-model="text">
<input type="submit" class="btn btn-add" value="+">
</form>
<!-- end add new todo -->
<!-- begin show all todos -->
<section class="todo-list">
<ul>
<li ng-repeat="todo in remainingTodos()">
<input class="checkbox" type="checkbox" ng-model="todo.done" id="todo-{{$index}}">
<label for="todo-{{$index}}" ng-class="{done: todo.done}">{{ todo.task }}</label>
<button class="btn btn-delete" ng-click="deleteTodo($index)">x</button>
</li>
</ul>
</section>
<!-- end show all todos -->
</main>
</div>
</body>
</html>