Where is the best way to upload ember strap data to fill the store:
I am currently using revision 13 of ember data.
I'm currently trying to use this in ApplicaitonRoute:
App.ApplicationRoute = Ember.Route.extend setupController: -> App.Contact.find().then (contacts) -> console.log contacts.get('length')
What I find is that the console.log statement above will write 0, but if I then type:
App.Contact.find().get('length')
in the console, the length will be what I would expect, i.e. more than 0.
I was confused about what was going on, I would have thought that the promise would not be resolved until the records were realized.
I went through the code and json figured out the serializer, and I can't figure out why the length is 0 for the first time.
I canβt create a fiddle for this, as this only happens when connecting to our backend store through the remaining adapter.
source share