mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
ea8256f43d
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
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT