ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Query params not updated by transitionTo/replaceWith during active transition

Open jesenko opened this issue 10 years ago • 5 comments

When entering a route, a call to transitionTo/replaceWith does not update query params when called prior to setupController hook.

Example: http://jsbin.com/merivu/5/ clicking About should set thing qp to transitioned

jesenko avatar Jan 22 '15 08:01 jesenko

Could this be the underlying cause?

Keep in mind that if the arguments provided to transitionTo or link-to only correspond to a change in query param values, and not a change in the route hierarchy, it is not considered a full transition, which means that hooks like model and setupController won't fire by default, but rather only controller properties will be updated with new query param values, as will the URL.

transitionTo with query params works when doing a full transition, but in @jesenko’s example, theoretically “only controller properties will be updated” but the controller doesn’t exist yet.

andrewbranch avatar Feb 03 '15 15:02 andrewbranch

@jesenko can you provide an updated example (reproduction of the issue) using a current release of Ember.js or the LTS release (2.4.6) ?

pixelhandler avatar Jun 17 '16 19:06 pixelhandler

@andrewbranch @jesenko @mmun @wagenet is this still an issue, perhaps we should close or create a new reproduction of this, what do you think?

pixelhandler avatar Sep 28 '18 16:09 pixelhandler

hey @pixelhandler this is still a "bug", I reproduced the error in this ember twiddle, I used v3.4.3:

https://ember-twiddle.com/1b49297f72c0de95987554d65e233685

@jesenko, could you please comment what is your use case for this? Maybe we can find a different way to do what you want?

arnaldo2792 avatar Mar 20 '19 03:03 arnaldo2792

@arnaldo2792 thanks for creating the reproduction :)

pixelhandler avatar Mar 20 '19 23:03 pixelhandler