emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.45k stars 4.21k forks source link

Router service's `urlFor` does not include sticky queryparams in generated url #20396

Open emattias opened 1 year ago

emattias commented 1 year ago

🐞 Describe the Bug

When generating url with urlFor function on router service sticky params are not included in the generated url unlike when doing the same thing with generateURL in the private -routing service

🔬 Minimal Reproduction

  1. Go to Ember twiddle
  2. press Go to sub route with page=3 link
  3. notice how only the last url generated with generateURL includes the sticky param ?page=3 in the url

Also it will only include the sticky param if it is supplied with an empty object as the third argument.

😕 Actual Behavior

Sticky params are not included when generating urls with urlFor

🤔 Expected Behavior

Sticky params to be included when generating urls with urlFor

ginaesps commented 1 year ago

Hello! Is this issue confirmed, or was it solved in further version due to breaking changes? Could you give further explanation in why is urlFor expected to grab sticky params even without specifying so I can help, please?

ginaesps commented 1 year ago

In which version should I work this bug? 3.18 or the most recent one (4.11)?

amk221 commented 5 months ago

Also affecting me via https://github.com/rwjblue/ember-router-helpers/issues/313