Ember 2, Show a single loading message when the ids where included in the original response

I could not stop thinking about your problem and I did some additional research. I never used JSON API but could it be that your api response has not the correct format?

I think that when you return the categories array you need to include the post ids. Because otherwise Ember thinks that the category has no posts and shows the red background.

I updated my Ember Twiddle api response and removed the {reload: true} and I think it behaves now as you want it to.

Yes, but I need the techinque without ids for sideload my posts. I need the page (category) instantly load and then fetch (with loading message) all the posts in the “links related” using the ember-data JSON API rules.

Maybe a bug of ember-data?

In my JSON API response for category there is no “data:” attribute, as you can see. If I put it empty ember-data doesn’t load from “links related”.

UDPATE: You modified the response and now you load everything in the first place (categories route). I don’t want this. In my list page I just need category top attributes.

This is the problem.

How to fix this?

Are you sure that the posts are sideloaded in my Ember Twiddle? As I mentioned I never used JSON API but my intention was to include just the post ids (not the post data itself). When you access model.posts in your each loop the post data is fetched from the api.