tymondesigns / angular-locker

🗄️ A simple & configurable abstraction for local/session storage in angular js projects
https://npm.im/angular-locker
MIT License
314 stars 42 forks source link

Documentation Request - 100% Angular Fallback #28

Closed tmcgee123 closed 8 years ago

tmcgee123 commented 8 years ago

In the midst of supporting private browsing on Safari (it doesn't allow webstorage), our product owner wanted a fallback for storage.

The solution we've provided was a temporary storage fallback, utilizing Angular's $cacheFactory and a decorator for angular-locker.

Here is a link to the Gist.

Would this be something you would want to provide in the case someone did not want to use Remy's polfill that utilizes cookies for a fallback? I realize that this is not as permanent as a cookie (refreshing will wipe the $cacheFactory values), but some people might want something Angular driven.

This is just a suggestion, any thoughts, comments, or criticisms would be highly appreciated as this is a code that is live on a production level website (tens of thousands of users a day).

tymondesigns commented 8 years ago

merged