Created
September 11, 2013 17:20
-
-
Save fxck/6526848 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
currencyFilter.$inject = ['$locale']; | |
function currencyFilter($locale) { | |
var formats = $locale.NUMBER_FORMATS; | |
return function(amount, currencySymbol){ | |
if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM; | |
return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2). | |
replace(/\u00A4/g, currencySymbol); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment