[localStorage] - module for angular 5



I need to install some module for localStorage (angular 5 - ionic last version) because not detect localStorage.getItem, etc functions …

Someome know any lib about it???

Thanks a lot!


can’t you use https://ionicframework.com/docs/storage/ ?
and if you are really into local storage you could configure it, that it only uses localstorage as driver.


Yes, I use also @ionic/storage indexeddb, but I use localStorage and sessionStorage too.

Can I use localStorage and sessionStorage with localForage???

Thank for any help


you can do multiple instances with localforage: https://github.com/localForage/localForage#multiple-instances

and for session storage you cold make your own driver: https://github.com/localForage/localForage/wiki/Custom-Drivers#available-custom-drivers

There is even one for session strorage, but it might be outdated (last commit from 2016):


Thank you!

But have I some way to do this sync??

Because I have used localStorage and sessionStorage that are blocking thread and this new ones are asyncs, thanks


you maybe could use await… or deal with promises the normal way