I am trying to create the CRUD application using sqlite. But data is not coming not length is showing in console.
devName : any =
showData(){
this.sqlite.create({
name: ‘data.db’,
location: ‘default’
}).then((db:SQLiteObject)=>{
db.executeSql('Select * from danceMoves',[])
.then(data=>{
console.log("Result",data)
// console.log(data.rows.length);
if (data.rows.length > 0) {
for (var i = 0; i < data.rows.length; i++) {
let item = data.row.item(i).name
this.devName.push(item);
console.log("dev",this.devName)
}
}
}).catch(err=>{
console.log("query err",err)
})
}).catch(err=>{
console.log("show fun error",err)
})
}