Cordova to Capacitor, storage feature

I developed several ionic cordova applications. Now I’m migrating an app on capacitor. I need to use Storage feature.

On cordova app i used:

npm install @ionic/storage-angular
ionic cap sync
import { Storage } from '@ionic/storage';

On capacitor app, it not works. Library not found

What is the solution?

Assuming you are still using Angular, check out the Angular documentation here - GitHub - ionic-team/ionic-storage: Ionic Storage module for Ionic apps.

Thanks @twestrick. I’m using it for cordova but is it compatible with capacitor?

Ionic Storage is all web technology unless you are using SQLite with it. If you are using SQLite, then you have to use the localForage-cordovaSQLiteDriver plugin for native storage.

1 Like

Thankyou @twestrick.

1 Like