-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalculator.component.html
28 lines (25 loc) · 1.25 KB
/
calculator.component.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
<div class="container" style="background-color: bisque; width: 40%; position: absolute; left: 30%; right: 30%; height: 350px; border: 4px ridge rgb(113, 104, 233);margin-top: 5px;">
<h1>CALCULATOR</h1>
<div *ngIf="operator==''">
<input type="text" value={{value1}} class="form-control" name="value1">
</div>
<div *ngIf="operator!='' && bingo==false">
<input type="text" value={{value2}} class="form-control" name="value2">
</div>
<div *ngIf="bingo">
<input type="text" value={{result}} class="form-control" name="result">
</div>
<div>
<button class="btn btn-primary" style="margin: 2px;" (click)="move(i)" *ngFor="let i of [1,2,3]" >{{i}}</button>
</div>
<div>
<button class="btn btn-secondary"style="margin: 2px;" (click)="move(i)" *ngFor="let i of [4,5,6]" >{{i}}</button>
</div>
<div>
<button class="btn btn-success" style="margin: 2px;" (click)="move(i)" *ngFor="let i of [7,8,9,0]">{{i}}</button>
</div>
<div>
<button class="btn btn-outline-danger" style="margin: 2px;" (click)="setOperator(i)" *ngFor="let i of ['+','-','*','/','=']">{{i}}</button>
</div>
<div><button class="btn btn-outline-success" style="margin: 2px;" (click)="clear1()">Clear</button></div>
</div>