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

前端 未结 6 2165
情深已故
情深已故 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 02:07

    The answer from suraj brought the decisive solution.

    I had the same problem. In app.module.ts I had both specified: import {IonicStorageModule} from '@ionic/storage'; and: import {Storage} from '@ionic/storage'. When I could not solve the problem, I have installed: npm install @ionic/storage. I have removed: import {Storage} from '@ionic/storage' from app.module.ts, and only left this: import {IonicStorageModule} from '@ionic/storage'; After that the problem was fixed.

提交回复
热议问题