AngularJS Tutorial - Do math in expression








The following code shows how to do math in expression.

Example


<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!--from   w ww. j a  va  2 s .  co  m-->
<body>
1+2={{1+2}}
<h3>{{20*5/3}}</h3>
</body>
</html>

The code above is rendered as follows: