Live Demo
Why this:
# Controller
$scope.price = -10;
# View
{{ price | currency }}
results in ($10.00)
rather than
I know this is an old question, but the accepted answer is only answering why this happens, without a concrete solution to the problem. I think the "most correct way" of doing this, is to use a decorator like so:
angular
.module('app')
.config(['$provide', function($provide) {
$provide.decorator('$locale', ['$delegate', function($delegate) {
if($delegate.id == 'en-us') {
$delegate.NUMBER_FORMATS.PATTERNS[1].negPre = '-\u00A4';
$delegate.NUMBER_FORMATS.PATTERNS[1].negSuf = '';
}
return $delegate;
}]);
}]);
This is only called once, valid for any filter which depends on it, and you don't need a custom filter for your currency formatting.