我有以下标记:
<div class="full">
<dl class="no-margin">
<dt ng-if="foo.IsLoading" class="no-margin text--plain">
<img alt="Load animation" src="load_small.gif"/> Loading
</dt>
<dt ng-if="!foo.IsLoading" class="no-margin text--plain">{{foo.BalanceLabel}}</dt>
<dd class="h3 text--plain" ng-class="{' text--negative': model.IsNegativeBalance(foo.BalanceValue)}">{{foo.BalanceValue | currency:"CAD"}}</dd>
</dl>
</div> 唯一的问题是,它将3位数值添加到值的开头:“The 1,234.56”或"-CAD1,234.56“
这对美元来说很好,因为我们想把美元放在最前面。然而,我的设计要求外国三位数在金额的末尾:"1,234.56 CAD“或"-1,234.56 CAD”。
我还能使用角通货API来完成这个任务吗?
发布于 2016-04-04 16:20:48
你不能用货币过滤器来解决这个问题。你是解决问题的两种选择。
图1 :
使用i18n角(例如de)
<script src="i18n/angular-locale_de-de.js"></script>图2 :
在没有货币筛选器的情况下,使用带货币的筛选号
{{foo.BalanceValue | number:2}}CAD对于图1,我不确定要使用货币CAD。我只试着用欧元。
https://stackoverflow.com/questions/36407658
复制相似问题