I am trying to use the local storage in my project.
I am getting the error while running the project.I am new to Ionic ,so please help me out.
Did you followed the Storage guide here: https://ionicframework.com/docs/storage/
Maybe you forgot the import the StorageModule in your app.module.ts
What is this?
Ionic Storage?
Browser local storage?
I have imported the Storage Module in app.module.ts
Actually there was version problem:
I changed my version to 1.1.6:
but now I am getting the following error:
Please help me with this,
Thanks
You didn’t import the StorageModule. Please read the Docs first
import { IonicStorageModule } from '@ionic/storage';
@NgModule({
declarations: [
// ...
],
imports: [
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot()
],
bootstrap: [IonicApp],
entryComponents: [
// ...
],
providers: []
})
export class AppModule { }
Browser Local Storage,which is local provider I created by the command
ionic g provider localprovider
Thank-you
I used
import{ Storage}from ‘@ionic/storage’;
Is this wrong…
I posted the example from the docs. You have to import the StorageModule first in your app.module.ts before you can use the Storage anywhere else in your application.
I got my mistake,actually i have not included HttpModule in the imports.
Thanks for your help
vithika
Could you share your screen shots for future references(app.module.ts)