Ionic/storage not supported in ionic 4?

#1

Hi,

We’re currently in the middle of migrating to ionic 4 which seems like a big improvement so far :+1:

However we use the ionic/storage (https://ionicframework.com/docs/storage/) plugin in ionic 3 and i cant seem to find it in the ionic 4 docs. Their is a native storage plugin (which does not support browsers as i understand) and their is a secure storage but we use that for different purposes.

I think i could just use localstorage ?

Thanks in advance,
Robin

2 Likes
#2

Ionic Storage is exactly the same in V4, just install it:

npm install @ionic/storage --save

and add IonicStorageModule.forRoot() to the imports in your root module, and then just use it as normal. If you want to use SQLite for storage, make sure to install that as well: npm install cordova-sqlite-storage --save

12 Likes
#3

Thanks, Really like your website/tutorials btw

2 Likes
#4

Storage docs are under “Building” for some strange reason in the beta docs:

2 Likes
#5

can you give me a sample code for sqlite operations in ionic v4