AngularJS Tutorial - Currency Filter








The currency filter formats a number as currency.

To format 123 as currency we can use {{ 123 | currency }}.

We can display a currency symbol or identifier.

The default currency is for the current locale.

Example


<!DOCTYPE html>
<html  ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
<!--from   w ww .  j a va  2  s .co m-->
</head>
<body ng-app>
  <h1>{{123|currency}}</h2>
</body>
</html>

The code above is rendered as follows: