Book Image

PhoneGap 4 Mobile Application Development Cookbook

Book Image

PhoneGap 4 Mobile Application Development Cookbook

Overview of this book

Table of Contents (19 chapters)
PhoneGap 4 Mobile Application Development Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

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:

  1. 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.

  2. Then unzip the newly downloaded file; so you have the following files:

  3. The file you need is dist/ng-cordova.js or dist/ng-cordova.min.js. The .min...