mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
02b18dc5b0
The router has several default strategy implementations that are either assigned via `new XStrategy()` property assignements or via the factory function for the `Router` itself. These can be simplified by providing the default implementation in the strategy `Injectable`. Custom implementations can still override the defaults by specifying them in the `providers` list. Notably, this change also makes the `UrlHandlingStrategy` and `RouteReuseStrategy` defaults injectable via DI rather than having to indirectly grab them by going through the `Router` instance and accessing the properties. PR Close #48022