-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathng_repeat.html
35 lines (27 loc) · 1 KB
/
ng_repeat.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>
<title>AngularJS ng-init & ng-repeat</title>
<script src = "js/angular.min.js"></script>
</head>
<body>
<div ng-app = "" ng-init = "countries = [{locale:'en-US',name:'United States'}, {locale:'en-GB',name:'United Kingdom'}, {locale:'en-FR',name:'France'}]">
<h2>List of Countries with locale:</h2>
<ol>
<li ng-repeat = "country in countries">
{{ 'Locale: ' + country.locale + ', Country: ' + country.name}}
</li>
</ol>
<ol>
<li ng-repeat = "country in countries">
<b>Locale:</b> {{country.locale}}, <b>Country:</b> {{country.name}}
</li>
</ol>
<ol>
<li ng-repeat = "country in countries">
<b>Locale:</b> <span ng-bind = "country.locale"></span>, <b>Country:</b> <span ng-bind = "country.name"></span>
</li>
</ol>
</div>
</body>
</html>