Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
AngularJS Currency Filter Example
Keywords : Angularjs format number to currency example, Angularjs currency filter with decimal example, Angularjs number with custom currency symbol euro, rupee, etc. example
Example
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> AngularJs Currency filter Example </title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script> var app = angular.module("AngularcurrencyApp", []); app.controller("currencyctrl", function ($scope) { $scope.sampleval = 52343.1435784; }); </script> </head> <body ng-app="AngularcurrencyApp"> <h2>AngularJS Currency Filter Example</h2> <div ng-controller="currencyctrl"> Enter Number: <input type="text" ng-model="sampleval" /><br /><br /> Default Currency expression:{{sampleval | currency}}<br /><br /> Currency with Custom Value: {{sampleval | currency : "USD$"}} <br /><br /> Currency with Zero Decimals: {{sampleval | currency : "USD$" : 0}} </div> </body> </html>
Click Here to See Result
Result
Previous
Next