We’re using the ngCordova SQLIte plugin and have used this code to check it’s all working:
var openDatabase_ = function(dbName){
$log.log("dbInitialised: %s", dbInitialised);
$log.log("Opening DB...");
var q = $q.defer();
var db;
if($cordovaSQLite && $window.sqlitePlugin !== undefined){
$window.alert("SQLite plugin detected");
db = $cordovaSQLite.openDB({ name: dbName });
q.resolve(db);
}
else {
db = $window.openDatabase(
dbName,
"0.0.1",
"Our DB",
200000,
function(){
$window.alert("Created WebSQL DB!");
}
);
q.resolve(db);
}
return q.promise;
};
When we use “ionic run android” we know we’re using SQLite because of the pop-up. This is on an N4 and N5.
When we use Ionic View we’re getting the “Created WebSQL DB!” pop-up which means SQLite isn’t working for some reason.
Is this a quirk of Ionic View or are we doing something else wrong?