Thanks Adithya. According to ionic 2 doc https://ionicframework.com/docs/v2/storage/ we can use it for web as well. I want to see what is causing the error, when using in web.
I am unable to run app in Firefox and Safari browser with ionic run browser --target=āsafariā. Any Idea, as someone mentioned ionic 2 will not support Firefox.
it is really easy just :
add ālocalstorageā to driverOrder like this::
** IonicStorageModule.forRoot({**
** name: āDatabaseā,**
** driverOrder: [āindexeddbā, ālocalstorageā]**
** }),**
ionic is smart. when u use browser to run youre app IONIC STORAGE use indexeddb,websql ans etc.., in the other side when you run youre app in genymotion or devices IONIC STORAGE use from device storageā¦
if u run app in browser and get then NOT AVAILABLE ERROR or you`re data store in WebSql instead of indexeddb .just need to add localstorage to driverOrder to fix this.
I had this problem and fix when add localstorageā¦