Home Angular Angular How to Add Two Number

Angular How to Add Two Number

4 min read
0
0
164

In this tutorials will teach How to add two numbers in Angular.

First you have to add the FormsModule inside the imports.

Create the new Components addnumbers

addnum.components.html

addnum.components.ts

num1:string = ”;
num2:string = ”;
result:number=0;
Total()
{
  this.result = parseInt(this.num1) + parseInt(this.num2);
}

Full code on the

addnum.components.ts

i have attached the video link below. which will do this tutorials step by step

 

 

 

 

Load More Related Articles
Load More By admin
Load More In Angular

Leave a Reply

Your email address will not be published.

Check Also

Node js React Mongodb Search Functionality

In this articles will teach how to search records Node js React Express Mongodb.how the se…