-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathng_basic.htm
44 lines (44 loc) · 866 Bytes
/
ng_basic.htm
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
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<style>
td { padding: 5px; }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.js">
</script>
<script type="text/javascript">
angular.module('myApp', []).controller('MyCtrl', function($scope) {
$scope.items = [ {
a: "A1",
b: "B1",
c: "C1"
}, {
a: "A2",
b: "B2",
c: "C2"
}, {
a: "A3",
b: "B3",
c: "C3"
}, {
a: "A4",
b: "B4",
c: "C4"
}, {
a: "A5",
b: "B5",
c: "C5"
} ];
});
</script>
</head>
<body ng-controller="MyCtrl">
<table>
<tr ng-repeat="item in items">
<td>{{item.a}}</td>
<td>{{item.b}}</td>
<td>{{item.c}}</td>
</tr>
</table>
</body>
</html>