Book Image

Learning Ionic

By : Arvind Ravulavaru
Book Image

Learning Ionic

By: Arvind Ravulavaru

Overview of this book

Table of Contents (19 chapters)
Learning Ionic
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The Ionic plugin API


There are four main commands that you will be using while dealing with plugins.

Add a plugin

This CLI command is used to add a new plugin to the project, for example:

ionic plugin add org.apache.cordova.camera

Also, you can use this:

ionic plugin add cordova-plugin-camera

Remove a plugin

This CLI command is used to remove a plugin from the project, for example:

ionic plugin rm org.apache.cordova.camera

Also, you can use this:

ionic plugin rm cordova-plugin-camera

List added plugins

This CLI command is used to list all the plugins in the project, for example:

ionic plugin ls

Search plugins

This CLI command is used to search plugins from the command line, for example:

ionic plugin search scanner barcode

To test the earlier commands, we will scaffold a new project and execute them. Run the following command:

ionic start -a "Example 28" -i app.example.twentyeight example28 blank

Note

When you download the blank project, the following plugins will be downloaded and setup:

cordova...