-
Notifications
You must be signed in to change notification settings - Fork 2
/
show_shubh.html
75 lines (62 loc) · 1.52 KB
/
show_shubh.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html>
<style >
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="customersCtrl1">
<!--table style="float: left">
<caption>SLA1</caption>
<tr>
<th>Minor</th>
<th>Distance</th>
</tr-->
<h1> {{rand}}</h1>
<table style="float: left" ng-repeat="(num,value) in names" >
<caption>SLA{{num+1}}</caption>
<tr>
<th>Minor</th>
<th>Distance</th>
</tr>
<tr ng-repeat="y in value">
<td>{{ y.minor }}</td>
<td>{{ y.dist}}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.config(['$qProvider', function ($qProvider) {
$qProvider.errorOnUnhandledRejections(false);
}]);
/*
app.controller('customersCtrl1', function($scope, $http,$timeout) {
$scope.reload = function () {
$http.get('http://127.0.0.1:8081/show')
.then(function (response) {
$scope.names = response.data;
});
$timeout(function(){
$scope.reload();
},3)
};
$scope.reload();
});
*/
app.controller('customersCtrl1', function($scope, $http,$timeout,$interval) {
$http.get('http://127.0.0.1:8081/show')
.then(function (response) {
$scope.names = response.data;
});
$interval(function () {
location.reload();
}, 5000);
});
</script>
</body>
</html>