【发布时间】:2017-07-05 04:07:33
【问题描述】:
我创建了一个使用api转换货币的方法,如下所示,
exchange(Input: string, Output: string, value: number): number {
let inputRate = this.currencyStorage.getCurrencyRate(cnput);
let outputputRate = this.currencyStorage.getCurrencyRate(Output);
return value/ inputRate * outputputRate;
}
我怎样才能创建一个可以在整个应用程序中用于转换货币的管道?
【问题讨论】:
标签: angular filter pipe currency