4
votes

If I get my ember-data model from the store and transition to a route with it

var model = App.Foo.find(1);
router.transitionTo('foo', model);

It transition to the route below and I see the console.log

App.FooRoute = Ember.Route.extend({
    redirect: function() {
        console.log("redirect ...");                                         
        this.transitionTo('bar');
    }
});

If I change the model and transition again, it still does the console log and everything works. But if I do a find on the same model 2x in a row, the console log never happens. When I step through ember source (RC3) I can't see why it would abort in this case.

Why does the transition get aborted in ember when I do this?

2
I'm dealing with the same issue. I'll submit an answer if I find a solution.Jonathan Allen Grant

2 Answers

1
votes

I'm not sure what you're asking -- can you provide the exact code for what you mean by "change the model and transition again" and "do a find on the same model 2x in a row"?

Besides that... a route isn't 're-entered' if you're transitionToing an already active route, although I'm not sure if that's even relevant here -- could you please clarify what you're doing?

1
votes

My workaround is to call a store method from the route transition button, which then emits to my desired component. A little "hacky" for my taste, but what works works.