Important plugins

We will discuss a few important plugins that are required in most of the apps. These plugins are available for both iOS and Android, but we will discuss the common JS code here as the native code is abstracted from the developer.

Camera plugin

This plugin enables taking pictures and videos from the camera using your Ionic App and saving it to the local storage. This is available in the ngCordova module as the $cordovaCamera service. We have to use dependency injection to inject this service to any controller or service we want to use this in.

The command line to be executed using the Ionic/Cordova CLI is:

cordova plugin add cordova-plugin-camera

The $cordovaCamera service exposes one method getPicture(options) to invoke the native ...

Get Ionic : Hybrid Mobile App Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.