货币转换器在离子 [英] Currency Converter In ionic
本文介绍了货币转换器在离子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将实时货币转换器纳入我的离子应用程序,但似乎无法找到有关如何解决这个问题的更多信息。有没有人可以使用任何有用的链接或信息?
I am trying to include a live currency converter into my ionic application but cannot seem to find much information on how to go about this. Does anyone have any useful links or information i could use?
推荐答案
要转换货币,有许多不同的服务。
To convert currencies there are many different services.
这是一项允许兑换货币的服务 http://fixer.io/。
Here a service that allows to convert currencies http://fixer.io/.
要转换两种货币,您必须进行GET:
To convert two currencies you have to make a GET:
GET http://api.fixer.io/latest?symbols=USD,CHF
结果(json):
{
"base":"EUR",
"date":"2017-04-18",
"rates":{
"CHF":1.0686,
"USD":1.0682
}
}
现在使用http对象来调用服务。
Now use http object to call the service.
这篇关于货币转换器在离子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文