1. Requirements Description
The phone call function is called on the Ionic project. At the beginning also want to find Cordova and Ng-cordova plug that, now H5 implementation is particularly convenient.
2. Preparation
All URL schemes in Cordova are subject to the whitelist, so now add the project CONFIG.
<access origin= "tel:*" launch-external= "yes"/>
Making a Phone call from within PhoneGap in Android and IOS
3. Code implementation
①html code directly to write it
<a href= "tel:15210203452" > Call </a><a href= "tel:10086" > Hit 10066</a>
② in the controller, just a word.
$scope. Callphone=function () {$window. location.href= "tel:10085";}
4. Extended reading
The implementation of ①ios requires the use of plug-ins, specific reference linked materials.
http://rickluna.com/wp/2012/02/making-a-phone-call-from-within-phonegap-in-android-and-ios/
② Handheld Mobile Special Link: Call, send text, send e-mail
Ionic Series--Call system phone