I want to refresh a page when I click a button (refresh the data in the page, release the cache)
The main page I have a list in my main page. there is a function for change the item on the list. but when I change the item and redirect to main page it show me the previous values until refresh the page, I want to refresh only when I press the button (clear the cache on main page ).
in controller $state.go("app.feed"); I wrote this. how do I change it ?
Asked
Active
Viewed 6,843 times
4
Sajith
- 311
- 1
- 6
- 16
2 Answers
2
If you just want to reload the state you can use:
$state.go($app.feed, {}, {reload: true});
$state.go($state.current, {}, {reload: true});
you can refer this page :Clear History and Reload Page on Login/Logout Using Ionic Framework
or
Refer this page:
0
Keep "cache-view" attribute in the view, and it will not cache which always load fresh data
<ion-view view-title="Favourite List" cache-view="false">
justnajm
- 4,422
- 6
- 36
- 56