O'Reilly logo

Getting Started with Ionic by Rahat Khanna

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required