This solution makes it easy to add offline storage to Ionic apps that are secure (encrypted on device using 256-bit AES), highly performant, and provide advanced data querying. Learn more.
If you have not already setup Ionic Enterprise in your app, follow the one-time setup steps.
Next, install the plugin:
Offline Storage is powered by SQLite, so it's incredibly easy to use - simply leverage familiar SQL query syntax.
If using Angular, start by injecting Offline Storage as a provider to the project in
@ionic-enterprise/offline-storage into the desired class (A dedicated service that encapsulates Offline Storage logic is recommended).
Next, initialize the database then immediately create (or open) a table:
Insert data into a database table:
Read data from a database table:
Close the database:
Delete the database (provide the same configuration details used when creating it):
Useful for debugging issues.