Chad
Chad

Reputation: 18396

Ember Data Async Relationships Not Loading

So I have a route that has lists of users on it. When I you click on their avatar you go to their profile. The problem I'm running into is when I pass the user through the {{link-to}} helper and the transition occurs the properties that were marked as async in model are never fetched. I'm attempting to access the async properties in the template in the profile so this should cause a fetch.

Not sure what is going on here.

Upvotes: 0

Views: 634

Answers (1)

dasnixon
dasnixon

Reputation: 998

In your afterModel hook you should fetch the async relationships.

afterModel: (model, controller) ->
  model.get('some_async_relationship')

Upvotes: 1

Related Questions