我有数据我想获得货币欧元价值而不是美元如何可能。
[{"currency":"USD","amount":3260},
{"currency":"EUR","amount":"320.00"}]
我的代码是
<div class="col-xs-6">
<h5 ng-repeat="balance in balances">
{{balance.amount | currencyFilter:balance.currency}} ({{balance.currency}})
</h5>
</div>
答案 0 :(得分:1)
如果您只想显示货币而不是美元的数据:
<div class="col-xs-6">
<h5 ng-repeat="balance in balances | filter:{ currency : '!USD' } ">
{{balance.amount}} ({{balance.currency}})
</h5>
</div>
答案 1 :(得分:0)
试试这个 -
<div class="col-xs-6">
<h5 ng-repeat="balance in balances" ng-if="balance.currency !== 'USD'">
{{balance.amount}} ({{balance.currency}})
</h5>
</div>