reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

How to make it working with SSR? #176

Closed karwank closed 4 years ago

karwank commented 5 years ago

I try to use NgxJsonapiModule in Universal app. Although I have blocked caching in this way:

NgxJsonapiModule.forRoot({
  url: '//example.test/api/v1/',
  cache_prerequests: false,
  cachestore_support: false
}),

When this.booksService.all() is performed I get an error on server side:

ERROR { Error: Uncaught (in promise): Error: No available storage method found.
Error: No available storage method found

Is it possible to disable Caching completely? Actually I don't need it since my application will work also as PWA.

pablorsk commented 4 years ago

The new version >=2.1.7 drops LocalForage store, and come with an agnostic Data-Provider. On own case, we work with Dexie, but is optional and dont touch original object like old version of this library.