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

前端 未结 6 2159
情深已故
情深已故 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:15

    In addition to Suraj's answer I found that I needed to explicitly create the Storage object in the constructor passing in the options e.g.

    	this.storage=new Storage({name:"__mydb"});

    So I did not include "Storage" in the providers for my component, nor in the constructor

提交回复
热议问题