-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Query param is sticky for different route model in routeable ember-engine #14788
Comments
Thanks for reporting!
The solution seems reasonable in general (specifically, we need to ensure that the cache key is built up correctly inside the engine). I think the next step is getting an isolated failing test case. Please take a look at some of these engine tests tests for an idea of how to set it up. I believe we should be able to add a test in that file that replicates the scenario you describe in the issue description. |
I have written the failing test case with the fix in one commit below. It was originally failing but now passed after my change |
@rajaalauddin perhaps make a PR for the failing test? And the fix too :) |
@pixelhandler I have created pull request here #14794 |
Closed via #14794 |
I have reproduced this issue in this repo https://github.com/rajaalauddin/ember-engines-demo
Sample steps on how to reproduce the issue:
These are not the case when done outside engine.
Another developer and i have traced this issue down to how calculateCacheKey is called.
var cacheKey = _emberRoutingUtils.calculateCacheKey(aQp.controllerName, aQp.parts, aQp.values);
Changing the above to:
var cacheKey = _emberRoutingUtils.calculateCacheKey(aQp.route.fullRouteName, aQp.parts, aQp.values);
fixed the problem for us. Let me know if this is the correct solution so that i can create a pull request.
The text was updated successfully, but these errors were encountered: