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() {
this.storage.ready().then(() => {
return this.storage.get('savedArticles');
});
}
In my Page:
this.storage.getSavedArticles().then((value) => {
console.log(value);
this.savedArticles = value;
});
Please help, thanks.