forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(router): combine functions for getting loaded config (angula…
…r#45613) There are two functions which do the same thing and are meant to search for the closest loaded config in the `ActivatedRouteSnapshot` parent tree. These can be combined to reduce code duplication. One difference in the current implementation is the early exit for the implementation in `activate_routes` when `route.component` is defined. This early exit takes advantage of the fact that the component must then also have a `RouterOutlet`, which injects `ComponentFactoryResolver`, which would end up being the same one as what would be found if we continued to look up the parent tree. This is only a tiny optimization that will actually break when we add `providers` as a feature to the `Route` config. In this scenario, we _must_ find the correct injector in the parent routes and cannot rely on a parent `RouterOutlet` since there may be some route with a providers list in between. PR Close angular#45613
- Loading branch information
Showing
4 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters