Tuesday, April 21, 2015

AngularJs Currency Filter

This adds currency filter to an expression that returns a number. Here, we add currency filter to print fees using currency format.

<html>
<title> AngularJs Directives </title>

<body>

<div ng-app="" ng-controller="firstController">

<ol>

{{ data.fee | currency}}

</ol>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>

<script>


function firstController($scope)
{

$scope.data={
fee:'100'
};
}

</script>

</body>
</html>

No comments:

Post a Comment