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
1df5a007
Commit
1df5a007
authored
Sep 16, 2024
by
Koushik Paul
Browse files
Upload New File
parent
8d96f302
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
app.component.ts
app.component.ts
+25
-0
No files found.
app.component.ts
0 → 100644
View file @
1df5a007
import
{
Component
}
from
'
@angular/core
'
;
import
{
RouterOutlet
}
from
'
@angular/router
'
;
@
Component
({
selector
:
'
app-root
'
,
standalone
:
true
,
imports
:
[
RouterOutlet
],
templateUrl
:
'
./app.component.html
'
,
styleUrl
:
'
./app.component.css
'
})
export
class
AppComponent
{
stringToEvaluate
:
string
=
""
takeInput
(
num
:
string
){
this
.
stringToEvaluate
=
this
.
stringToEvaluate
+
num
;
}
evaluateResult
(){
if
(
this
.
stringToEvaluate
!=
''
){
this
.
stringToEvaluate
=
eval
(
this
.
stringToEvaluate
);
}
}
resetInput
(){
this
.
stringToEvaluate
=
""
;
}
}
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