avoid loading of lazy engines when generating linkto urls for routes #1945
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this came up when adding embroider scenarios to the ember-engines repo
there we test the same engine mounted at on different paths that can link between each other
this causes router_js implementation to generate url links from LinkTo component
in the current implementation the queryparam hydration for non visited routes would cause the lazy engines to load eagerly upon encountering a link to that lazy engine even if it was never visited
it also has the sideeffect of firing off initializers and instance initializers out of order from classic builds
this change implements the same query param handling logic that the ember-engines repo was doing in its own router extension
engines repo has tests to verify that the qp's are correctly maintained with this implementation