如何使联系人的电话号码可点击呼叫并在离子发送消息? [英] How to make a contact's phone number clickable to call and to send a message in ionic?

查看:186
本文介绍了如何使联系人的电话号码可点击呼叫并在离子发送消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 GitHub 克隆离子项目

联系人的电话号码无法点击拨打电话和短信。因此,对于index.html文件第39行,我从

While the contact's phone number is not clickable to call and message. So for the index.html file line 39, I converted from

<p ng-if="contact.emails.length > 0">{{contact.emails[0].type}} : {{contact.emails[0].value}}</p>

<p ng-if="contact.phones.length > 0">{{contact.phones[0].type}} : <a ng-href='{{contact.phones[0].value}}'>{{contact.phones[0].value}}</a></p>

但结果是该应用程序不再加载任何联系人的信息。

But it turns out the app will not load any contact's information anymore.

有没有什么我错过了或我完全错误发送数据?

Is there anything I missed or am I totally wrong on sending data?

推荐答案

调用离子你需要在confi.xml中添加这个代码

to make phone call with ionic you need to add this code in confi.xml

<access launch-external="yes" origin="tel:*" />

并且在您的视图中,您需要添加:

and in your view you need to add:

<a ng-href=tel:{{user.phoneNumber}} class="button button-positive">Call me</a>

这篇关于如何使联系人的电话号码可点击呼叫并在离子发送消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆