在ionic的应用中,经常会使用到点击直接拨打电话功能,这个在ionic中是如下实现的:
方法:
$scope.callPhone = function (phonenumber) { console.log("拨打:" + phonenumber); $window.location.href = "tel:" + phonenumber; };
注意:需要在ionic项目的config文件中添加如下代码
<access origin="tel:*" launch-external="yes"/>
注:IOS需要借助插件,具体参照链接资料!
http://blog.csdn.net/yu17310133443/article/details/53100321点击打开链接