Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(router): Move config loader tracking to the RouterConfigLoad…
…er (#45656) This wasn't exactly possible before because the `RouterConfigLoader` was not an Injectable so there wasn't a straightforward way to share information between `ApplyRedirects` and the preloader. They each had their own implementation so they needed to store the values on the `Route` so they both had access to them. I imagine this was the case because trying to inject `Router` (to get access to the events) into the preloader would have caused a circular dependency. This refactor co-locates the loading details with the loader itself rather than leaking implementation into the public route config and mutating the object in an awkward way. This also promotes `RouterConfigLoader` to a proper `Injectable` so data can be shared throughout the system. PR Close #45656
- Loading branch information
Showing
7 changed files
with
34 additions
and
35 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
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