-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (38 loc) · 1.16 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
<!DOCTYPE html>
<!--
NOTE: to view this file locally, start up a simple HTTP server in this directory like this:
python -m SimpleHTTPServer 8000
-->
<html>
<head>
<title>Sample controller and view</title>
<link rel="stylesheet" href="/css/main.css">
<script src="/node_modules/angular/angular.min.js"></script>
<script src="/js/app.js"></script>
<script src="/js/todos.factory.js"></script>
<script src="/js/todos.controller.js"></script>
</head>
<body ng-app="sampleApp">
<div ng-controller="TodosController as todos">
<h1>Todos</h1>
<h2>Current todos</h2>
<ul ng-if="todos.list.length > 0">
<li ng-repeat="item in todos.list">{{ item }}</li>
</ul>
<p ng-if="todos.list.length < 1">
<em>No todos currently</em>
</p>
<button
ng-click="todos.clear()"
ng-disabled="todos.isClearButtonDisabled()">Clear</button>
<h2>Add todo</h2>
<p>Please enter some text, and then press the <strong>Add todo</strong> button.</p>
<input
type="text"
ng-model="todos.inputText" />
<button
ng-disabled="todos.isSubmitButtonDisabled()"
ng-click="todos.add()">Add todo</button>
</div>
</body>
</html>