Can't resolve all parameters for Storage: (?)

前端 未结 6 2131
情深已故
情深已故 2020-12-10 01:45

I am getting values from a modal and I want to store and get it using local storage in ionic2 angular2 project. My code is given below. It gives following error:

6条回答
  •  醉梦人生
    2020-12-10 01:59

    From @ionic/storage version - 2.0.0, make the below changes:

    app.module.ts

    import { IonicStorageModule } from '@ionic/storage';
    
    //..
    @ngModule({
    
    imports: [
      IonicModule.forRoot(MyApp),
      HttpModule,
      IonicStorageModule.forRoot(),
    ]
    

    Note: you need to remove import { Storage } from '@ionic/storage';

    Check release notes here

提交回复
热议问题