I am working on an Ember app where I wish a button click to transition to a new route passing an object as the context for that route.
The problem is, no matter how I try and pass that context, it is always lost by the time I get to the route I am transitioning to.
Investigating (http://jsfiddle.net/fxbXM/2/) it seems that the the context is passed to the first route the router hits as it works to the requested route. (See the output of the connectOutlets function from each route level)
This seems to confirm what I thought I had found when debugging my actual app: in the triggerSetupContext function of Ember there are three enterStates
: [Router, 'root', 'create'] and there are three contexts
: [myObject, null, null]
If the contexts were in the opposite order then I would get what I wanted where I wanted it!
Am I making some fundamental error in the way i'm passing the object as a context? Should I be using another approach?