-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (65 loc) · 1.98 KB
/
Copy pathindex.html
File metadata and controls
70 lines (65 loc) · 1.98 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
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
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>AngularJS Calculator</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<script src="script.js"></script>
<style>
.input {
margin-top: 10px;
margin-bottom: 10px;
width: 180px;
height: 30px;
font-size: 16px;
padding: 5px;
border-radius: 5px;
border: 1px solid rgb(227, 9, 9);
border-radius: 5px;
}
.container {
height: 70%;
position: relative;
border: 3px solid green;
border-radius: 10px;
}
.center {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
</style>
</head>
<body ng-controller="myCtrl">
<div class="center container" style="background-color:rgba(0, 255, 255, 0.438);">
<h1 style="color: blue; text-align: center"> <u>Simple Calculator Using ANGULAR JS</u> </h1>
<div style="text-align: center;">
<p> <b>Input 1 :</b>
<input type="text"; ng-model="firstNum" class="input" placeholder="Enter First Number">
</p>
</div >
<div style="text-align: center;">
<p> <b>Input 2 :</b>
<input type="text" ng-model="secondNum" class="input" placeholder="Enter Second Number">
</p>
</div>
<div>
<h4 style="text-align: center;">SELECT THE OPERAND </h4>
<button ng-click="add()" class="input">Addition (+)</button>
<button ng-click="subtract()" class="input">Subtraction (-)</button>
<button ng-click="multiply()" class="input">Multiplication (*)</button>
<br>
<button ng-click="divide()" class="input">Division (/)</button>
<button ng-click="" class="input">None</button>
<button ng-click="modulus()" class="input">Modulus (%)</button>
</div>
<div style="text-align: center;">
<p><b>Result :</b>
<input type="text" ng-model="result" class="input" placeholder="Result"> </p>
<p>Designed by Abhishek Tirkey</p>
</div>
</div>
</body>
</html>