我通过覆盖货币过滤器并添加来解决问题.replace(/\uFFFD/g, currencySymbol);
以下原始代码摘自https://github.com/angular/angular.js/blob/1c1cd4fdf6b6d7511c7b8dc61b8042011dc54830/src/ng/filter/filters.js
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);
};
}
最终代码将如下所示
return formatNumber(amount,currencyFormat , ',', '.', fractionSize).
replace(/\u00A4/g, currencySymbol).replace(/\uFFFD/g, currencySymbol);