Using ngCordova
ngCordova
is an AngularJS extension on top of the Cordova API. This extension makes building, testing, and deploying Angular JS–based Cordova applications easier. Since Ionic framework is built upon AngularJS, we can utilize ngCordova
to get easier access to Cordova plugins' API. In this section, we are going to see how to use ngCordova
along with Ionic framework. We will use the $cordovaDialogs
call dialog plugin API from the Ionic application. The $cordovaDialogs
plugin will display a native dialog box for each corresponding platform.
How to do it...
To get started using ngCordova
, follow these steps:
Start by downloading
ngCordova
. Go to http://ngcordova.com/ and click on the download link. Alternatively, you can download it straight from the GitHub repository by visiting https://github.com/driftyco/ng-cordova/archive/master.zip.Then unzip the newly downloaded file; so you have the following files:
The file you need is
dist/ng-cordova.js
ordist/ng-cordova.min.js
. The.min...