-
Notifications
You must be signed in to change notification settings - Fork 0
/
work.html
50 lines (37 loc) · 1.2 KB
/
work.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
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Angular JS</title>
<script src="angular.min.js"></script>
<script src="app.js"></script>
<script src="fooController.js"></script>
<script src="foo.js"></script>
</head>
<body ng-app="mainApp" ng-controller="fooController">
<!--Here Angular JS set-up click event as well as YourName valirable -->
<div>
<h3>To display valirable's value from angular JS controller:</h3>
{{YourName}}
</div>
<div>
<h3>Binding Text box</h3>
<label>Type your name: </label>
<input type="text" ng-model=YourName>
</div>
<div>
<h3>To bind button's click event</h3>
<button ng-click='init()'>Hit Me</button>
</div>
<div>
<h3>To bind dropdown list</h3>
<select name="users" ng-options="user.name for user in Users" ng-model="SelectedUser">
<option value="">--Select User--</option>
</select>
<br />
<br />
<span>User Name: {{SelectedUser.name}}, UserId: {{SelectedUser.userid}}</span>
</div>
</body>
</html>