-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
37 lines (37 loc) · 1.58 KB
/
index.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
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
<script type="text/javascript" src="./scripts/app.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./css/main.css">
</head>
<body>
<h1>Challenge Three</h1>
<div ng-app="myApp" ng-controller="oneController">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Country</th>
<th class="text-right">1960</th>
<th class="text-right">1970</th>
<th class="text-right">1980</th>
<th class="text-right">1990</th>
<th class="text-right">2000</th>
<th class="text-right">2010</th>
<th class="text-center">% Growth 1960-2010</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="country in countries | orderBy: country.name" ng-if="country.1960 + country.1970 + country.1980 + country.1990 + country.2000 + country.2010 !== 0">
<td>{{country.name}}</td>
<td class="text-right">{{country.1960 | number}}</td>
<td class="text-right">{{country.1970 | number}}</td>
<td class="text-right">{{country.1980 | number}}</td>
<td class="text-right">{{country.1990 | number}}</td>
<td class="text-right">{{country.2000 | number}}</td>
<td class="text-right">{{country.2010 | number}}</td>
<td class="text-right">{{100*(country.2010-country.1960)/country.1960 | number:0}}
</tr>
</tbody>
</table>
</div>
</body>