Skip to content Skip to sidebar Skip to footer

Ionic 3 Sqlite Not Return Value

I create provider to insert , select , delete , update data in sqlite this my code in database.service.ts to get data getData(){ return this.sqlite.create({ name: 'data.

Solution 1:

You must publish an event with your data and listen your event in where you wait for data.

Because:

this.sqlite.create({ name: 'data.db', location: 'default' }) .then()

Is async call and dosnt return value. You should do like this:

this.events.publish('getData', dataRows);

And listen to event in where you want:

events.subscribe('getData', (data) => {
 //Do somethings
 });

Post a Comment for "Ionic 3 Sqlite Not Return Value"