You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to upgrade from Ember 2.3 to 2.10 and encountered a problem when I have a route nested inside another route and both use the same controller, and that controller has a query parameter.
I have created an ember twiddle to reproduce the problem.
When I go to the route /outer/inner I get the following error:
Assertion Failed: You're not allowed to have more than one controller property map to the same query param key, but both `outer:token` and `outer:token` map to `token`. You can fix this by mapping one of the controller properties to a different query param key via the `as` config option, e.g. `token: { as: 'other-token' }`
It seems the method, _queryParamsFor where this method is raised doesn't consider the fact the two controllers are the same, and that maybe this should be okay.
I don't actually know if it should be okay, but if there some reason this can't work, it means you can't use query parameters at all when a nested route uses the same controller as the outer one. This is a motif I have employed extensively throughout my app and it used to work.
The text was updated successfully, but these errors were encountered:
@kbullaughey this sounds quite similar to #14560 which has been fixed but not yet released in a beta version. For our app, I was able to pull down a copy of this repo and build v2.11.0-beta.4 cherry picked with the changes from commits that fixed 14560. If you can, I'd recommend going this route for a quick test.
I am attempting to upgrade from Ember 2.3 to 2.10 and encountered a problem when I have a route nested inside another route and both use the same controller, and that controller has a query parameter.
I have created an ember twiddle to reproduce the problem.
When I go to the route
/outer/inner
I get the following error:It seems the method,
_queryParamsFor
where this method is raised doesn't consider the fact the two controllers are the same, and that maybe this should be okay.I don't actually know if it should be okay, but if there some reason this can't work, it means you can't use query parameters at all when a nested route uses the same controller as the outer one. This is a motif I have employed extensively throughout my app and it used to work.
The text was updated successfully, but these errors were encountered: