Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear the local storage on page refresh #352

Open
smohammedyasin opened this issue Jun 20, 2017 · 1 comment
Open

Clear the local storage on page refresh #352

smohammedyasin opened this issue Jun 20, 2017 · 1 comment

Comments

@smohammedyasin
Copy link

Hello,
This is not an bug. it is just a question

i have a scenario to save the data on page load and clear data on page refresh or navigate to another page. can some on help me to please.

Appreciate for best response

@grevory
Copy link
Owner

grevory commented Jun 20, 2017

localStorageService.set('something', true);
// ...
localStorageService.get('something');
// ...
window.onbeforeunload = function (e) {
localStorageService.clearAll()
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants