Angularjs currency filter example


Angularjs currency filter example : It converts the number in currency format


Syntax : Angularjs currency filter Example

Currency Example

<!DOCTYPE html>
<html lang="en">
<head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
</head>

<body>
<div ng-app="myApp" ng-controller="myController">
  <input type="number" ng-model="total" aria-label="total"> <br>
  Default currency is ($): <span id="curr-default">{{amount | currency}}</span><br>
 
</div>

<script>
  angular.module('myApp', [])
    .controller('myController', ['$scope', function($scope) {
      $scope.total = 300.50;
    }]);
</script>
</body>
</html>

Try it »

Angularjs currency filter example

Angularjs currency filter example


Add Comment

📖 Read More


Advertisements