角货币过滤器 - 添加了符号

Pet*_*hhh 22 currency angularjs

我正在使用角度的货币过滤器,它似乎输出一个额外的符号:Â.

html:

{{totals.subtotal | currency}}
{{totals.tax | currency}}
{{totals.total | currency}}
Run Code Online (Sandbox Code Playgroud)

对象总计:

var totals = {subtotal: 500, tax: 65, total: 565};
Run Code Online (Sandbox Code Playgroud)

输出:

Â$500.00
Â$65.00
Â$565.00
Run Code Online (Sandbox Code Playgroud)

有没有人遇到过这个?我正在使用最新的角度1.0.6

更新:事实证明角度的缩小导致了这一点.当我包括非缩小角度时,它固定它.

Ben*_*lan 13

是的,证实这是丑化的.

如果您使用该ascii_only=true选项构建它,那么它似乎可以解决问题.


小智 6

确保您拥有此元标记.

<meta charset="utf-8">
Run Code Online (Sandbox Code Playgroud)