-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab3.html
More file actions
49 lines (38 loc) · 1.7 KB
/
lab3.html
File metadata and controls
49 lines (38 loc) · 1.7 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
44
45
46
47
48
49
<!--
ng-app − This directive starts an AngularJS Application.
ng-init − This directive initializes application data.
ng-model − This directive defines the model that is variable to be used in AngularJS.
ng-repeat − This directive repeats html elements for each item in a collection.
-->
<!DOCTYPE html>
<html ng-app="">
<head>
<title>ng-app − ng-init − ng-model - ng-repeat</title>
<meta charset="utf-8" />
<script src="Scripts/angular.js"></script>
<script>
var StudentsLog = [{ Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }];
</script>
</head>
<body>
<div>
<input type="text" name="name" value="" ng-model="name" />
<span ng-bind="name"></span>
</div>
<p>List of Countries with locale:</p>
<div ng-init = "countries = [{locale:'en-US',name:'United States'}, {locale:'en-GB',name:'United Kingdom'}, {locale:'en-FR',name:'France'}]">
<ol>
<li ng-repeat="country in countries">
<b>{{ 'Country: ' + country.name + ', Locale: ' + country.locale }}</b>
</li>
</ol>
</div>
<div ng-init="StudentsLog = [{ Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }, { Name: 'Amit Kumar Mishra', Class: 'II' }]">
<ul>
<li ng-repeat="student in StudentsLog">
{{student.Name +" "+ student.Class}}
</li>
</ul>
</div>
</body>
</html>