SQLitePlugin does not work in development

I need to use a local database and I found SQLitePlugin. The problem is than I can’t use it in development because cordova.js is not really loaded.

Is there a solution?

Thanks!

What do you mean “development”? Are you referring to testing in a web browser?

When you start adding plugins or other native device features into your application, I strongly encourage you to start doing all your testing in a simulator or on a physical device.

Since the SQLite plugin was based on the WebSQL API, here is a little solution to add functionality to the web browser:

You basically check if cordova.js exists (it won’t in a web browser). If it doesn’t exist use WebSQL, otherwise use the SQLite plugin.

Regards,

I cannot use WebSQL because I have to load data from a local database. It its not possible with WebSQL. I will try to use an emulator for now.

me too same problem… did you find a solution ? cause to compile every time is really hard…
thanks

I changed for a native app. I have no solution for you. Sorry.