-
Notifications
You must be signed in to change notification settings - Fork 42
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
Respect parent route query params #62
Comments
Yes, that was the idea, but I have to admit that I hit a dead end with that. The logic around query params was quite messy. I should try to finish it, but I don't think I'll have time in the next days. |
Any news on this ? |
@homersimpsons I didn't find a solution for the PR and i forgot about it. I'm not sure if with the new router service almost done in newer versions we should keep pursuing this as it will be an "official" href-to soon. |
@cibernox Okay, thank you for your answer :) |
It should be possible to achieve this via ember-router-helpers. {{#with (route-params 'parent.child') as |routeParams|}}
<a href={{routeParams.url}}
class={{if routeParams.isActive "active" "inactive"}}
{{action routeParams.transitionTo}}>Blah</a>
{{/with}} I didn't test it directly, but I tried it in my own version of those. The core difference is that the transition is not handled via URL handling but by using route params directly. |
In my app I have a query param at the
application
level. Most of the time it'll never make it's way into the URL because the default value is not changed. However, when it is, it seems like any{{href-to}}
URL's don't know about that, probably because it isn't passed in as(query-params)
. The issue would be that child routes don't really have direct access to the current value to pass in. Is there a way for this helper to know about those and add them to the URL automatically?The text was updated successfully, but these errors were encountered: