I am new to IONIC and wants to do some database operations . for this I have chosen sqlite as database. So following tutorial Tutorial Link I wrote my app.js as
db = $cordovaSQLite.openDB("nextflow.db"); //line 29
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS ta_sheets(id integer primary key AUTOINCREMENT, name varchar(255))");
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS tas(id int primary key, name varchar(255), description TEXT, amount DECIMAL(10,2), date DATE )");
but somehow its not creating any database and console shows error TypeError: n.sqlitePlugin is undefined
.openDB() ng-cordova.min.js:9
<anonymous> app.js:29
.$get</t.ready/<() ionic.bundle.min.js:384
r() ionic.bundle.min.js:22
o() ionic.bundle.min.js:22
Whats wrong ? I am totally lost. Any help/hint is highly appreciated.
Aucun commentaire:
Enregistrer un commentaire