I only share the last file because I have found mentions on Google of putting the call inside ionicPlatform.ready() function but the tutorial I’m following does not do it that way.
Wow, thank you. That worked. I had run “cordova plugin add org.apache.cordova.file”. I did not know that I had to use “ionic” instead of"cordova". Is that true for all plugins? Thank you.
Yeah, I don’t know what the difference is, as I think the Ionic CLI is a wrapper for the Cordova CLI as far as plugins go. I just use the Ionic CLI all the time for consistency and just in case something is different - which it apparently is in this case.
The same suddenly appeared on adnroid 4.4.4. The strange thing is that I can do console.log(cordova) and I see cordova.file which looks fine. But when I do console.log(cordova.file) one line below I get undefined.
Hi all, a quick follow-up on ‘cordova plugin add’ vs. ‘ionic plugin add’. Ionic CLI indeed wraps some cordova methods, but it also extends/fixes some things on it, e.g. by adding the plugin to the package.json. This might be useful when using ‘ionic state reset’ as it will take the package.json as base for plugin installation.