Ionic Refresh

Hi Ionic Community,
I need a solution to refresh…I tried pulling Refresh in ionic it works fine…I dont want that one…For example,i am using websql to store data in database while i insert or update the particular data i need automatic list refresh in ionic…Reply will be appreciated.

Regards,
Yuvaraj…

I’m not too familiar with ion-refresh, I think @Calendee may be a better source of info on this. Any ideas?

Thanks For Your Response,
Yes I tried the ion-refresh it works fine when i drag the list…I dont want the user to do that…I want the list refresh automatically using ionic…Can you understand my problem.

Regards,
Yuvaraj…

Well you just need a trigger to call the refresh method if the changes happen outside of ionic. If the changes are withing ionic / angular, then the data will be updated automatically through the data bindings.

I posted something similar a while back. The issue is that your want your data refreshed without user interaction. In that case, you don’t want to use the refresher at all. It’s just a visual cue to the user that their action has an effect.

Hi Calendee,
Thanks for your Reply…Can you suggest me in ionic without pull refresh can we get instant data from local database like websql,or sqllite…I tried to get the data from WebSql database…It works fine…But the Data is not refreshed…I am using Tabs in my project…So the content or the list is not refreshed after i delete the record from the local db…can you get me…

Regards,
Yuvaraj…

I think you are going to need to update your $scope property after the record is deleted from the db.

Something like :

deleteFromDb(record).then(
function() {
 $scope.myData = getFromDb();
}
);

Hi Calendee,
Thanks For Your Response.I had fixed this issue two days back…I just Update the Database in $scope after the delete operation is finished…At last I have one Query Can you plz Make Ionic Trigger Refresh automatically after the insert or delete Operations.It Will be Very much useful for the New Begginers…

Regards,
Yuvaraj…

As I’m not one of the developers, I wouldn’t be able to do that. In any case, I think that is outside the scope of Ionic. That’s just parts of the developer’s job for their specific code case.

Hi, i have the same problem, you have found a solution? Can you share please?