Skip to content

Instantly share code, notes, and snippets.

@rabbishuki
Last active December 31, 2017 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rabbishuki/d4d8978541c816c68462f9eadcedea04 to your computer and use it in GitHub Desktop.
Save rabbishuki/d4d8978541c816c68462f9eadcedea04 to your computer and use it in GitHub Desktop.
An AngularJS Decorator to format negative numbers with the currency filter.
angular.module('app')
.run(function ($locale) {
var currencyPatterns = $locale.NUMBER_FORMATS.PATTERNS[1];
patterns.negPre = '-\u00a4';
patterns.negSuf = '';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment