I want to work with sqlite with cordova framework for the first time. As I\'ve read on a tutorial I should use ngcordova like this:
var db = null;
app.contro
You might take a look at this tutorial:
https://www.thepolyglotdeveloper.com/2014/11/use-sqlite-instead-local-storage-ionic-framework/
When you see this error:
TypeError: Cannot read property 'openDatabase' of undefined
It is happening for one of a few reasons:
$cordovaSQLite
methods in the $ionicPlatform.ready()
function.The most common reasons for this error are #1 and #2. Native plugins, must be used only after the application is confirmed ready, thus the $ionicPlatform.ready()
method. Since native plugins use native code, you cannot test them from your web browser.
Read through the tutorial I linked because it should help you.
Regards,
Actually, I opened an old project and I get this error only when I run the project with -cls (because of liverelaod). But I have a small bug to fix there so I didn't investigate it too much(just fix it without livereload). But maybe this little hint helps somebody.