Skip to content
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

{{link-to}} with only query-params always points to the route in which it was created #12033

Closed
cibernox opened this issue Aug 9, 2015 · 0 comments

Comments

@cibernox
Copy link
Contributor

cibernox commented Aug 9, 2015

I made an small ember-cli app to reproduce the bug: https://github.com/cibernox/ember-link-to-qps-bug

Steps to reproduce the expected behaviour:

  • Go to /cars and paginate. All good
  • If you click in the Add new car link to open the child route /cars/create and then exit, the pagination works. All good.

Reproduce the buggy behaviour

  1. Go to /cars/create and reload the browser.
  2. Close the form. Note that the href in the pagination links is /cars?page=X.
  3. Try to paginate. Instead of going to /cars?page=X the app transitions to /cars/create?page=X

Apparently when the {{link-to (query-params page=1)}} is rendered when a sub route is active, the link will "point" to that route even when you transition back to the parent one. That is not the expected behaviour.

I may or may not have time to fix this this week, but i'll try. If anyone knows the exact point where this is failing go ahead and beat me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant