angular-local-storage icon indicating copy to clipboard operation
angular-local-storage copied to clipboard

Should throw exception if trying to exceed the quota.

Open hrajchert opened this issue 11 years ago • 0 comments

The problem is in addToLocalStorage, if you save something that exceeds the quota it will broadcast the error and try to save it in cookies, if that fails, it will broadcast another error.

I would recommend having a general store method and in the service configuration check if it can store to local storage or not, and using that point store to addToLocalStorage or addToCookies

Each of those methods should either throw an exception or return a failed promise

hrajchert avatar Jul 29 '14 21:07 hrajchert