-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
35 lines (23 loc) · 953 Bytes
/
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
<DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
</head>
<!-- Telling HTML file Angular App TODOLIST is part of body-->
<body ng-app="ToDoList">
<div ng-controller="MainController">
<div ng-repeat="item in list">
<li> {{ item }} </li>
</div>
<!--ng-model is binding this field to the variable 'addToDo' since we are in the div still for MainController it will use that
function in the controller -->
<input ng-model="addToDo">
<!--ng-click is similiar to react's onClick function (does not need anon funct)-->
<button ng-click="addItem()"> Add This To-Do</button>
</div>
<!-- Modules -->
<script type="text/javascript" src="js/app.js"></script>
<!-- Controllers -->
<script src="js/controllers/MainController.js"></script>
</body>
</html>