-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
30 lines (27 loc) · 821 Bytes
/
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
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body ng-app"">
<div ng-app="" ng-init="myCol='lightblue';title='Weather Balloon Data'">
<h1> {{title}} </h1>
</div>
</body>
<button onclick="getData()">Get Data</button>
<script>
function getData(){
alert("Called")
$http({
method: 'GET',
url: '/someUrl'
}).then(function successCallback(response) {
// this callback will be called asynchronously
// when the response is available
alert("Test")
}, function errorCallback(response) {
// called asynchronously if an error occurs
// or server returns response with an error stat.
alert("Error")
});
}
</script>
</html>