I use cordova-plugin-file in my ionic app to download images and save to local.
When I run it in emulator or iphone, there is no error, but when I test it in Chrome, it
Cordova will not be available in the browser; only on your device.
In your index.html you should have this script reference:
As the note says, the script won't be available during the development. It will be replaced during the build process.
You can try it yourself:
cordova platform add android
then
cordova build
and you should find under platforms\android\assets\www
2 js files: cordova.js and cordova_plugins.js.
Another option is to add browser as platform:
cordova platform add browser
and the run it:
cordova run browser
but you might face a few troubles.