The db var must exist and be defined, so you can use into your controller:
var db = $cordovaSQLite.openDB({ name: "myapp.db" });
to (re)open the db, or save the db variable somewhere (scope?).
The db var must exist and be defined, so you can use into your controller:
var db = $cordovaSQLite.openDB({ name: "myapp.db" });
to (re)open the db, or save the db variable somewhere (scope?).