Home > DeveloperSection > Forums > How to add tow number in Angularjs.
Ankit Singh

Total Post:341

Points:2389
Posted on    November-08-2015 10:42 PM

 .NET JQuery  Angular JS 
Ratings:


 1 Reply(s)
 343  View(s)
Rate this:
i want to Add two number in angularjs. please help me


aditya kumar Patel

Total Post:246

Points:1752
Supported
Posted on    November-08-2015 10:48 PM

Install angularjs and write following code.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AngulerJS.aspx.cs" Inherits="Forumasp.AngulerJS" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

<script src="Scripts/jquery-2.1.4.js"></script>

<script src="Scripts/angular.js"></script>

</head>

<body>

<form id="form1" runat="server">

<div>

<div ng-app="">

<h3>Using Input Type Number</h3>

<p>First Number:

<input type="number" ng-model="a" />

</p>

<p>Second Number:

<input type="number" ng-model="b" />

</p>

<p>Sum: {{ a + b }}</p>

</div>

</div>

</form>

</body>

</html>

 


Modified On Nov-08-2015 10:48:49 PM

Don't want to miss updates? Please click the below button!

Follow MindStick