-
Notifications
You must be signed in to change notification settings - Fork 26.4k
feat(router): Run loadComponent
and loadChildren
functions in the…
#62133
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
feat(router): Run loadComponent
and loadChildren
functions in the…
#62133
Conversation
… route's injection context This updates the loader code to run the `loadComponent` and `loadChildren` functions in the appropriate injection context for the route. A primary motiviation for this feature is to bring `loadChildren` with standalone components and the routes array to feature-parity with what was possible when using `loadChildren` and a module that provided routes via the `ROUTES` token and a factory function (which would have injection context). fixes angular#51532
f1d52cc
to
593a85b
Compare
This is a lovely feature! Thank you! I have 2 questions:
|
Possible, but a completely separate feature request :)
I think that issue is looking more for a one-stop shop transform, such as what might be achieved with something like in your first point. You can get what it's asking for by redoing the necessary transform on every route inside the |
This PR was merged into the repository by commit 9833d9e. The changes were merged into the following branches: main |
…ntext during route extraction Ensure that `loadChildren` functions are executed within the route’s specific injection context when extracting routes, aligning behavior with Angular’s dependency injection model. More context: angular/angular#62133 Closes angular#29483
…ntext during route extraction Ensure that `loadChildren` functions are executed within the route’s specific injection context when extracting routes, aligning behavior with Angular’s dependency injection model. More context: angular/angular#62133 Closes angular#29483
…ntext during route extraction Ensure that `loadChildren` functions are executed within the route’s specific injection context when extracting routes, aligning behavior with Angular’s dependency injection model. More context: angular/angular#62133 Closes angular#29483
…ntext during route extraction Ensure that `loadChildren` functions are executed within the route’s specific injection context when extracting routes, aligning behavior with Angular’s dependency injection model. More context: angular/angular#62133 Closes #29483
…ntext during route extraction Ensure that `loadChildren` functions are executed within the route’s specific injection context when extracting routes, aligning behavior with Angular’s dependency injection model. More context: angular/angular#62133 Closes #29483
… route's injection context
This updates the loader code to run the
loadComponent
andloadChildren
functions in the appropriate injection context for the route.A primary motiviation for this feature is to bring
loadChildren
withstandalone components and the routes array to
feature-parity with what was possible when using
loadChildren
and amodule that provided routes via the
ROUTES
token and a factoryfunction (which would have injection context).
fixes #51532