Ionic storage SQLite code example
Example: sqlite ionic
import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';
constructor(private sqlite: SQLite) { }
...
this.sqlite.create({
name: 'data.db',
location: 'default'
})
.then((db: SQLiteObject) => {
db.executeSql('create table danceMoves(name VARCHAR(32))', [])
.then(() => console.log('Executed SQL'))
.catch(e => console.log(e));
})
.catch(e => console.log(e));