-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (31 loc) · 1.09 KB
/
index.html
File metadata and controls
38 lines (31 loc) · 1.09 KB
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
<!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>
<p>Change the value of the input field:</p>
<input style="background-color:{{myCol}}" ng-model="myCol" value="{{myCol}}">
</div>
<p>AngularJS resolves the expression and returns the result.</p>
<p>The background color of the input box will be whatever you write in the input field.</p>
</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>