How to refresh a view in ionic

Many time we need to refresh previous view or any specific view on certain condition.

For example, we have a list of users on listUsers view and when we click on the specific user. we go into userdetails view on that view we uploading photo.

But after successfully upload an image we changed the image on userdetails view. But when we go back we still see old image into usersList view. That's the problem of cache.

Ionic not refresh view every time. You need to configure or forcefully download the latest view. for that, you need to disable cache on a particular view.

Here we need to disable cache into listUsers view. So, that it takes the latest view every time.


See the following video for example.



Configuration to disable cache in ionic and refresh view

 Problem - View not refresh when we upload an image to the server.
 Solution - Disable cache in state and view.
 Disable cache in state
 -----------------------
 cache: false

 Disable cache in view
 --------------------
 cache-view="false"





Next
This is the current newest page
Previous
Next Post »
Thanks for your comment