[FEATURE] Missed SessionStorage?!
WuglyakBolgoink opened this issue · 3 comments
WuglyakBolgoink commented
- why I need LOCAL_STORAGE? instead of normal using
localStorage
in code? - why you create only LOCAL_STORAGE and not SESSION_STORAGE too?
waterplea commented
- Accessing global objects is bad practice in Angular applications. They do not always exist, like in case of Angular Universal server-side rendering (see our sister package @ng-web-apis/universal where we provide SSR mocks for tokens from this library). It is also much easier to test since you can effortlessly mock dependencies from DI or even switch to some other concrete realization at some point.
- Initially we add only things we need in our own applications to this package. SESSION_STORAGE is a good idea, thanks for bringing it up, I will add it in a day or two.
MarsiBarsi commented
Hi!
Today we released a version 1.6.0 with SESSION_STORAGE token (#10). Thank you!
WuglyakBolgoink commented
@MarsiBarsi tnx a lot!