I have 1 issue in ngCordova plugin cordovaSQLite. Below code:
var db = $cordovaSQLite.openDB({ name: "myDB.db" });
i'm using "ionic serve" for run project in browser.
error: Uncaught TypeError: Cannot read property 'openDatabase' of undefinedng-cordova.js:5058
openDBapp.js:27
(anonymous function)ionic.bundle.js:37388
(anonymous function)ionic.bundle.js:2241
onPlatformReadyionic.bundle.js:2220
onWindowLoad
[Main error] http://i.stack.imgur.com/Yctpl.png
Could you please help me?
As stated by user jonnie in his answer
Cordova is platform specific and doesn't work when you run ionic serve
and
you can replace the cordova plugin with window to use the websql databases so instead of sqlitePlugin.openDatabase() you can use window.openDatabase()
It should work on actual devices just fine.