Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix($locale): make all filters $locale aware (even after $locale has changed) #9160

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ng/filter/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
*/
currencyFilter.$inject = ['$locale'];
function currencyFilter($locale) {
var formats = $locale.NUMBER_FORMATS;
return function(amount, currencySymbol){
var formats = $locale.NUMBER_FORMATS;
if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;

// if null or undefined pass it through
Expand Down Expand Up @@ -115,8 +115,8 @@ function currencyFilter($locale) {

numberFilter.$inject = ['$locale'];
function numberFilter($locale) {
var formats = $locale.NUMBER_FORMATS;
return function(number, fractionSize) {
var formats = $locale.NUMBER_FORMATS;

// if null or undefined pass it through
return (number == null)
Expand Down