A Simple Guide to Saving Data in Ionic 2

A Simple Guide to Saving Data in Ionic 2

Follow Josh Morony on

Learn Ionic with Josh ☕

Hey, I hope you enjoy the article.

If you want a weekly update with my newest content, access to the blog's bonus content, or you want to sign up for one of my free beginner or advanced email courses just enter your details here or in the form below.

Many applications require the ability to save data in some manner so that a user can perform some actions in the application, close the application, and have the application remember the user’s input from the last time they opened the application.

By default, anything you do within your application is just going to be lost as soon as the user closes the application. This is fine for some applications, but that’s not really going to work for a note taking application.

In order to persist data throughout different sessions, there are multiple different methods we can use, but one simple way to do this is to use the built-in Storage service that Ionic 2 provides.

In this video tutorial, we will walk through what the Ionic 2 Storage service is, how it works, and how to use it. Here’s the video:

Video Notes

  • The Storage service Ionic 2 provides will automatically use the best storage available

  • A native SQLite database will be preferred where available

  • Browser based storage (like local storage and WebSQL) will be used as a fallback

  • Browser based storage has limited capacity and can be wiped at any time by the operating system. Although it is not common for the memory to be wiped, it is possible, so you should not use it for data you need to store permanently

If you enjoyed this article, feel free to share it with your friends ☝

Check out my latest videos: