Commit 1df5a007 authored by Koushik Paul's avatar Koushik Paul
Browse files

Upload New File

parent 8d96f302
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 = "";
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment