Decouple controller lookup from URL generation. #14980
Merged
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.
Currently, calling
emberRouter.routerMicrolib.generate('somethign');
will force bothsomething
route andsomething
controller to be looked up. We do this so that we can properly handle any query params within that route/controller pair.The
ember-routing-router-service
work is adding aurlFor
method, that will ultimately allow users to generate urls without forcing the controllers to be looked up eagerly. Unfortunately, at the moment the eager controller lookup is completely entangled with thegetHandler
function that we provide to the router microlib.This commit removes the forced eager evaluation of
_qp
on a route within thegetHandler
function, while still supporting the current implementation of{{link-to}}
(which still utilizes the eager_qp
evaluation to generatehref
's).Some work is needed in ember-engines to support this PR, which I am working on now...
I did emberobserver.com searches for the following:
TODO: