New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using this.transitionTo skips loading the model #3989
Comments
If you change the transition to be IIRC if you pass primitives (string, number) to transition instead of a full model then it figures that's an ID and uses it to build the params for the call to The API docs could probably do with an example of passing IDs in instead of full models: http://emberjs.com/api/classes/Ember.Route.html#method_transitionTo Hope that makes sense |
Makes sense now. My initial gut question after your comment was how do you pass in multiple parameters? But it looks like you just pass them in as separate arguments.
That works well for me. |
Question here, if you have a route with subroutes all with dynamic segment: |
I'm not sure whether this is intentional behavior but let me explain. If I use a transitionTo on a route that has dynamic segments the model method on the destination route never gets called. Essentially I'm just passing through a params with an id and I still want to load the right model.
If I refresh the page with the right URL though the model gets loaded just fine. I put together a codepen to demonstrate.
http://codepen.io/anon/pen/LsfhB
The current version will log out to the console "I'm here." If you look at IndexRoute there is a commented out transition. If that is enabled the "I'm here" never triggers.
Is this expected? If so, where should I be loading my model for the confirmation route?
The text was updated successfully, but these errors were encountered: