Do math in expression

Description

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><!--   w  w  w  . ja v  a2 s . com-->
<body>
1+2={{1+2}}
<h3>{{20*5/3}}</h3>
</body>
</html>

Click to view the demo





















Home »
  AngularJS »
    AngularJS Example »




Controller
Directives
Expression
Filter
Form
Inject
Scope
Server
Style
Template
Utilities