Use Mozilla’s LocalForage For Key-Value Storage In Ionic 2


By Nic Raboy

When it comes to saving data in an Ionic 2 mobile application, there are many ways to get the job done.  You can use the classic HTML5 local storage, but run the risk of compatibility problems between all available devices.  You can use SQLite, which is part of Ionic Native, but that will only work for Android and iOS and has more of a mobile API.  You can also use SqlStorage, but that is a very proprietary solution.  This brings us to localForage from Mozilla.

Mozilla advertises localForage as a wrapper to IndexedDB, WebSQL and localStorage which will offer maximum compatibility across the grid.

We’re going to see how to include localForage in our application which is a valid option for Ionic 2.

Read the full article...

Share on Google Plus

About www. codeandyou.com

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment