To test, we will scaffold a new project and execute the following commands:
- Run the following command:
ionic start -a "Example 15" -i app.example.fifteen example15 blank --v2
And cd into the example15 folder.
- Let's search for the battery status plugin and add it to our project. Run the following command:
ionic plugin search battery status
- This will launch the default browser and will navigate you to: http://cordova.apache.org/plugins/?q=battery%20status. Depending on what plugin name you find, you can add that plugin to the project. So, in our case, to add the battery status plugin to the project, we would run this:
ionic plugin add cordova-plugin-battery-status.