Ionic Storage returning null


My ionic storage returns null data to page though it actually has data, when I log in provider inside the function I am getting the correct values, but when I call it via page and use then attacher to get value, I am getting null value.

Function in provider:

  async getSavedArticles() { => {

In my Page: => {
      this.savedArticles = value;

Please help, thanks.


Make sure you’re waiting on storage.ready() before trying to interact with it. I also am a huge unfan of async, for whatever that’s worth. I think it makes code much less readable.


I don’t work with async but if you add ‘return’ before ?

async getSavedArticles() {
    return => {


It won’t work as I want the promise for get method not the ready one.


Yes, but returning the ready promise will result in it returning your get promise.