美文网首页
Ionic 实现电话功能

Ionic 实现电话功能

作者: 如果你还记得我是小双鱼 | 来源:发表于2017-04-13 11:06 被阅读0次

    1.关于打电话在html中可以很方便的实现拨打电话先在config.xml中添加:

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

    2.然后在html中这样写:

    <a href="tel:10086">拨打10086</a>

    3.如果编译运行的时候报错

    则在config.xml中添加代码

    <allow-navigation href="*"/>

    发短信的插件

    关于发短信,是使用的ng-cordova的插件$cordovaSMS:

    cordova plugin add https://github.com/cordova-sms/cordova-sms-plugin.git

    记得相应的要在app.js中依赖ng-cordova,在发送短信的控制器中依赖$cordovaSms。

    相关文章

      网友评论

          本文标题:Ionic 实现电话功能

          本文链接:https://www.haomeiwen.com/subject/atfbattx.html