Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Koushik Paul
Angular Calculator
Commits
8d96f302
Commit
8d96f302
authored
Sep 16, 2024
by
Koushik Paul
Browse files
Upload New File
parent
4301e124
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
app.component.html
app.component.html
+26
-0
No files found.
app.component.html
0 → 100644
View file @
8d96f302
<div
class=
"calculator"
>
@if (!stringToEvaluate){
<div
class=
"calculator__output"
>
0
</div>
} @else {
<div
class=
"calculator__output"
>
{{stringToEvaluate}}
</div>
}
<div
class=
"calculator__keys"
>
<button
class=
"calculator__key calculator__key--operator"
(click)=
"takeInput('+')"
>
+
</button>
<button
class=
"calculator__key calculator__key--operator"
(click)=
"takeInput('-')"
>
-
</button>
<button
class=
"calculator__key calculator__key--operator"
(click)=
"takeInput('*')"
>
×
</button>
<button
class=
"calculator__key calculator__key--operator"
(click)=
"takeInput('/')"
>
÷
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('7')"
>
7
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('8')"
>
8
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('9')"
>
9
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('4')"
>
4
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('5')"
>
5
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('6')"
>
6
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('1')"
>
1
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('2')"
>
2
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('3')"
>
3
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('0')"
>
0
</button>
<button
class=
"calculator__key"
(click)=
"takeInput('.')"
>
.
</button>
<button
class=
"calculator__key"
(click)=
"resetInput()"
>
AC
</button>
<button
class=
"calculator__key calculator__key--enter"
(click)=
"evaluateResult()"
>
=
</button>
</div>
</div>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment