Open rabin-naga opened 6 years ago
delete $localStorage.storageName clears the localStorage but when we add a new value the old values are still there.
delete $localStorage.storageName
where as localStorage.removeItem('storageName') resets the localStorage to blank/null ie storageName = [];
localStorage.removeItem('storageName')
How can I use delete $localStorage.storageName to reset the localStorage to blank?
I just wanted to report the same. I switched back to the raw localstorage temporary, it works as excepted.
delete $localStorage.storageName
clears the localStorage but when we add a new value the old values are still there.where as
localStorage.removeItem('storageName')
resets the localStorage to blank/null ie storageName = [];How can I use delete $localStorage.storageName to reset the localStorage to blank?