i used storage in app.modules.ts file.
import { BrowserModule } from ‘@angular/platform-browser’;
import { ErrorHandler, NgModule } from ‘@angular/core’;
import { IonicApp, IonicErrorHandler, IonicModule } from ‘ionic-angular’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;
import { StatusBar } from ‘@ionic-native/status-bar’;
import { IonicStorageModule } from ‘@ionic/storage’;
imports: [
BrowserModule,HttpModule,
IonicModule.forRoot(MyApp),IonicStorageModule.forRoot()
],
I used to use NativeStorage, works fine for my use. You can give it a try, is almost the same as IonicStorage. Then just change your app.module.ts
file to:
...
import { NativeStorage } from '@ionic-native/native-storage';
...
...
providers: [
..
NativeStorage,
..
]
Did you installed it correctly?
Using
ionic cordova plugin add cordova-sqlite-storage
npm install --save @ionic/storage
i have already tired this part but not working.
Still not working? What’s the news?
Yes, can you give me a any other ideas please.
I think the error could be in the app.module.ts
file, change the import to uppercase in the Storage like :
import {IonicStorageModule} from '@ionic/Storage';
No, the import should be lower case. Is there access to a complete repo that reproduces this problem?
please anyone give me how to solve this?
Please give people the information they ask for if you want an answer.
1 Like
As @AaronSterling said, nobody can possibly solve this unless they have access to all the code that is potentially relevant, and you have not provided this so far.
@all helpers, now i create new project then only i solve this problem. but i don’t know why this error will occurs. any body can find that solution please mention it