Once you’ve got Ionic installed, installing ngCordova can be nice because (as I found out recently), Ionic doesn’t include a good way of accessing Cordova/Phonegap’s plugins. ngCordova is basically a collection of Angular services that allow you to use Cordova’s plugins.
To install (after already having installed Ionic and all of its dependencies), you’ll need to install “bower” (if you haven’t done so already for some other reason):
sudo npm install -g bower
Then you need to add the following to your index.html in your project:
And then add ngCordova as a dependency to the app (file may be app.js):
angular.module('app', ['ionic', 'app.controllers', 'app.services', 'ngCordova'])
Then add the plugin(s) you want like so:
ionic plugin add cordovaPluginName