Ionic 2 framework offers many native plugins. We can easily manipulate those plugins using the Ionic 2 CLI( command line interface).

In this tutorial, you will learn, how to add, remove and list the Ionic 2 native plugins.

Create a new Ionic 2 project using

ionic start pname blank --v2

To list the installed Ionic2 native plugins, use the below command.

cd pname

ionic plugins list

Output:

cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

The above command lists the installed plugin for this project. Please note I added many plugins, that's why it displaying many plugins. Only a few plugins will come as default.

To add new plugin

ionic plugin add cordova-plugin-camera --save

For more plugin, you can refer the below link.

https://ionicframework.com/docs/native/

To remove the installed Ionic 2 plugin use the below command.

ionic plugin remove cordova-plugin-camera

The above command will remove the camera plugin.