Clear saved data (cache), not appSettings


i want to clear saved data, i’m not talking about appSettings, i’m talking about the data that is in app before close it, for example data in listview… i want to clear all the app data when log out.

don’t tell me just viewModel.set(‘listview’,null); :smiley: i know how to clear single listview but i want to clear all data in all page


But how anyone here suppose to know how / where you are storing your data in your app :confused:

In general when you logout, you are going to close all your pages and any data associated with the page is also destroyed then. So lets know the use case, why would you want to clear data on each page? Is that data stored in a persistent storage, if Yes what apis you are using?


I’m not storing data nowhere, i’m doing simple logout

my logout function does: remove refresh and acces token from appSettings and navigate to home page thats it
and when i login back with other user, perevious users data are showing in listview, before getting current users data from the server and replace it.


Without knowing the app structure how it works, navigates, handles view model it’s hard to help here. Still a wild guess is to fire a custom event on logout, listening to which all your pages should reset their binding context.


first, my app is core js, not angular, i’m doing navigating with topmost, and in every pages view model i have logout function, why in every pages view model and why not in some, one shared js file? because when logout, i’m clearing intevals of page which checking acces token validation in every x seconds. my structure is not perfect i know. how can i listen one logout event from all pages?
can you show me an example?

or maybe I can acces to other pages data with topmost, to clear them?