You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps I have overlooked something in de docs, but I am wondering if I need to use saveItem first before I call loadFromObservable? My plan is to integrate ionic-cache into my generic Api provider that handles all HTTP traffic. I have something similar to the loadList example:
request(method: string,endpoint: string,body: any,options?: RequestOptions): Observable<any>{// Some other code
...
constapiCall=this.http.get(url,options);constkey=`prefix:${endpoint}`;returnthis.cache.loadFromObservable(key,apiCall.map(res=>res.json()));}
However, using it like this results in a Runtime Error saying "No such key". Therefore I thought I might be calling saveItem first? Can you perhaps point me in the right direction?
Many thanks!
The text was updated successfully, but these errors were encountered:
Perhaps I have overlooked something in de docs, but I am wondering if I need to use
saveItem
first before I callloadFromObservable
? My plan is to integrate ionic-cache into my generic Api provider that handles all HTTP traffic. I have something similar to theloadList
example:However, using it like this results in a Runtime Error saying "No such key". Therefore I thought I might be calling
saveItem
first? Can you perhaps point me in the right direction?Many thanks!
The text was updated successfully, but these errors were encountered: