Angularjs Examples

AJS Examples


AngularJS Currency Filter

Sometimes you may need to display some number in the currency format. AngulerJS has different filters, currency filter one of them to format number in currency for you. Lets assume you have some number that says 123 and you requiement is to format in currency, simpley use {{ 123 | currency }}.

Syntax

{{ someNumber | filter }}

AngularJS Currency Filter Example

<html>
<head>
<title>My first AngularJS Currency Filter code</title>
<Script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">
</Script>
</head>
<body>
<div ng-app="">
<h3> Expression: {{ 12500 | currency }} </h3>
</div>
</body>
</html>
See Live Example