My application index route receives data from the server using the Ember.$.getJSON(url)route model method. Then the response is put into storage using the pushPayload method. When I do foo.get('bars')where it foohas a lot bars(still in the hook of the model), this leads to empty bars . If you look at the server response and the ember inspector,, there really are some data on the foo bars . So I researched foo.get('bars')using the chrome console and found that bars entries are loaded into my canonicalState resource . So my workaround is to use foo.get('bars.canonicalState').
While it works well, but since it feels hacked and I cannot find the canonicalState property in the ember documentation, I would like to know if this is the right way to do this? and why is this happening?
source
share