Two things to note:
First, instead of
this.get('controller.target.router').transitionTo('image', queue, task, image);
Use:
this.get('controller').transitionToRoute('image.index', queue, task, image);
This might not change the behaviour, but it's more Ember idiomatic.
The second thing is the following:
Internal transitions will not trigger the model
hook on the route, because Ember assumes you are passing the model along with the transition, so no need to call the model
hook since you already passed the model.
That is why your breakpoint doesn't get triggered, the find
isn't being called (as it shouldn't).
I don't have enough information to find your issue but if I were to guess from the fact that a page refresh works and an internal transition doesn't is that there is an inconsistency between the objects passed to transitionTo
and between what is returned from the model
hook.
You should pass the exact object to transitionTo
as the ones that would have been returned by themodel
hook.
If you are doing:
this.get('controller').transitionToRoute('image.index', queue, task, image);
and it's not working, something is probably wrong with either queue
, task
, or image
models you are passing.
So this:
var task = //assume this value exists;
var queue = //assume this value exists;
var image = //assume this value exists;
is not very helpful because it could be where the problem is.