-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
117 lines (98 loc) · 2.77 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Orbitron&display=swap" rel="stylesheet">
</head>
<body ng-app="CalculatorApp" ng-init="a=0;b=0;curr=0;" ng-controller="CalculatorController">
<h1>Calculator</h1>
<div class="container">
<div id="header">
<div id="output">
<div id="text">
{{res}} {{ num_a }} {{sign}} {{ curr }}
</div>
</div>
</div>
<table>
<tr>
<td>
<button ng-click="mod()">%</button>
</td>
<td>
<button ng-click="mul()">x</button>
</td>
<td>
<button id="del" ng-click="cancel()">C</button>
</td>
<td>
<button id="del" ng-click="del()">DEL</button>
</td>
</tr>
<tr class="row">
<td>
<button ng-click="digit(7)">7</button>
</td>
<td>
<button ng-click="digit(8)">8</button>
</td>
<td>
<button ng-click="digit(9)">9</button>
</td>
<td>
<button ng-click="sub()">-</button>
</td>
</tr>
<tr class="row">
<td>
<button ng-click="digit(4)">4</button>
</td>
<td>
<button ng-click="digit(5)">5</button>
</td>
<td>
<button ng-click="digit(6)">6</button>
</td>
<td>
<button ng-click="add()">+</button>
</td>
</tr>
<tr class="row">
<td>
<button ng-click="digit(1)">1</button>
</td>
<td>
<button ng-click="digit(2)">2</button>
</td>
<td>
<button ng-click="digit(3)">3</button>
</td>
<td rowspan="2">
<button id="addbtn" ng-click="equal()">=</button>
</td>
</tr>
<tr class="row" >
<td>
<button ng-click="div()" >/</button>
</td>
<td>
<button ng-click="digit(0)">0</button>
</td>
<td>
<button>.</button>
</td>
</tr>
<!-- <tr id="result">
<td rowspan="2">{{ num_a }} {{sign}} {{ curr }} {{res}}</td>
</tr> -->
</table>
</div>
</body>
</html>