Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between ionic and cordova plugin install

When working with ionic, what is the difference between

ionic plugin install ...

and

cordova plugin install

Which one should be used? And why?

Thx!

like image 701
Petru Avatar asked Feb 08 '16 04:02

Petru


People also ask

Is Ionic better than Cordova?

The developers choose Cordova because of its plugins, excellent community support, and the ability to use JavaScript for mobile development. In contrast, developers choose Ionic for its rapid prototyping, great designs, and hybrid mobile style.

Does Ionic still support Cordova?

When people talk about Ionic Framework, they often put it in the “Cordova” or “Angular” buckets, because historically that's what Ionic was: a UI kit for Cordova and Angular apps. That was fine for the first few years of Ionic's life, but up to around 2018 things started changing.

How do I install an Ionic plugin?

Create an App in the Ionic Hub​ First, log into the Ionic Hub, then navigate to the Native Plugins Keys page. Click Assign to App , then New App . Enter a name, then click Create App .


1 Answers

There is a difference

Ionic create some files in the project, such as ionic.project and package.json.

Each time you add a plugin with Ionic using the command ionic plugin add ... , Ionic updates package.json.

Ionic CLI uses package.json to manage Cordova app state in terms of platforms and plugins.

package.json has two sections, cordovaPlatforms and cordovaPlugins that allows a ionic state restore to get the Cordova environment ready for build, run, etc...

More explanations here : https://stackoverflow.com/a/30192417/3096087

like image 96
Niko Avatar answered Sep 28 '22 03:09

Niko