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

Resource is not marked as builded #151

Closed a-radys closed 5 years ago

a-radys commented 5 years ago

What may be the reason that my resource is not marked as builded?

I can see that the server is responding properly with non-empty result. But my result is marked as loading: true and builded: false.

I'm also getting this error:


core.js:1673 ERROR TypeError: Cannot read property 'getOrCreateResource' of undefined
    at DocumentCollection.push../node_modules/ngx-jsonapi/ngx-jsonapi/@ngx-jsonapi/ngx-jsonapi.es5.js.DocumentCollection.fill (ngx-jsonapi.es5.js:762)
    at SafeSubscriber._next (ngx-jsonapi.es5.js:2138)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:209)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next (Subscriber.js:147)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:80)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:55)
    at CatchSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:80)
    at CatchSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:55)
    at TapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/tap.js.TapSubscriber._next (tap.js:51)
    at TapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:55)```
maxi7587 commented 5 years ago

Hi @aradys ! Have you set the type attribute in the service and the resource?

a-radys commented 5 years ago

Sorry, too much time have passed and I don't have this issue anymore, I probably made some workaround :)