Preloading data into Ember 1.0.0 / Ember Data 1.0beta

I’m attempting to preload data into an Ember 1.0.0 / Ember Data 1.0beta app following this guide:

Unfortunately the model hook of my index route is firing before the the activate hook of my application route meaning a call is made to the API to retrieve the data before it has a chance to be preloaded into the store.

A basic jsbin to hopefully explain what I mean:,js,output

Is the order the hooks are fired incorrect? Is the documentation wrong? Or am I missing something?

The guide has since been updated to recommend preloading data in the model hook, not the activate hook.

1 Like