-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtodo.html
More file actions
43 lines (35 loc) · 1.35 KB
/
todo.html
File metadata and controls
43 lines (35 loc) · 1.35 KB
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
<head>
<title>Todo List</title>
</head>
<body>
<div class="container"
ng-controller="TodosListCtrl">
<header>
<h1>Todo List ( {{ incompleteCount() }} )</h1>
<label class="hide-completed">
<input type="checkbox" ng-model="hideCompleted"/>
Hide Completed Tasks
</label>
<login-buttons></login-buttons>
<form class="new-task"
ng-submit="addTask(newTask); newTask='';"
ng-show="$root.currentUser">
<input ng-model="newTask" type="text" name="text" placeholder="Type to add new tasks" />
</form>
</header>
<ul>
<li ng-repeat="task in tasks" ng-class="{'checked': task.checked, 'private': task.private}">
<button class="delete" ng-click="deleteTask(task)">×</button>
<input type="checkbox" ng-checked="task.checked" ng-click="setChecked(task)" class="toggle-checked" />
<button class="toggle-private"
ng-if="task.owner === $root.currentUser._id"
ng-click="setPrivate(task)">
{{task.private == true ? "Private" : "Public"}}
</button>
<span class="text">
<strong>{{task.username}}</strong> - {{task.text}}
</span>
</li>
</ul>
</div>
</body>