WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AngularJS currency Filter


Example

Display the number as a money format:

<div ng-app="myApp" ng-controller="costCtrl">

<p>Price = {{ cost | money }}</p>

</div>
Try it yourself »

Definition and Usage

The currency channel arranges a number to a money format.

By default, the area cash group is used.


Syntax

{{ number | cash : symbol : fractionsize }}

Parameter Values

Value Description
symbol Optional. The cash image to be shown. The image can be any character or text.
fractionsize Optional. The quantity of decimals.

More Examples

Example

Display the cost in the Norwegian cash format:

<div ng-app="myApp" ng-controller="costCtrl">

<p>Price = {{ cost | cash : "NOK" }}</p>

</div>
Try it yourself »

Example

Display the cost with three deciamls:

<div ng-app="myApp" ng-controller="costCtrl">

<p>Price = {{ cost | money : "NOK" : 3 }}</p>

</div>
Try it yourself »

Related Pages

AngularJS Tutorial: Angular Filters