-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathavatar.html
More file actions
36 lines (29 loc) · 1.05 KB
/
Copy pathavatar.html
File metadata and controls
36 lines (29 loc) · 1.05 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
<html>
<head>
<!-- include our dependency on angular -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<script src="avatar.js"></script>
<meta charset="utf-8">
<title>User Avatar Template</title>
</head>
<body>
<div ng-app='app' ng-controller='mainCtrl'> <!-- [1],[2] -->
<h1>Create new user</h1>
<form name='userForm' ng-submit='addNew(userForm)'> <!-- [1], [2] -->
<input placeholder='Name' ng-model='userForm.name'/> <!-- [3] -->
<input placeholder='Image Url' ng-model='userForm.url'/>
<input placeholder= 'email' ng-model ='userForm.email'/>
<button type='submit'>Add New</button>
</form>
<ul class='User-list'>
<!--
ng-repeat loops through the users array bound to the scope of mainCtrl and gives
us access to the user object in each index so we can reference the user properties
-->
<li ng-repeat='user in users'>
<avatar user='user' />
</li>
</ul>
</div>
</body>
</html>