Saturday, June 24, 2017

Ionic’s LocalStorage is now called simply Storage in Ionic 3 and behind the scenes Storage decides the best method to store the data. On mobile phones for example, SQLite is the preferred storage method. IndexedDB, WebSQL or localstorage is used in browsers for Progressive Web Apps.

UsageNow you’re ready to start using Storage’sset,getandremovemethods. Let’s use a simple example where we have three methods, one that sets a team as a favorite, one that removes the team from the favorites and one that checks if a team is a favorite:Component: team.ts