Description
🚀 feature request
Relevant Package
This feature request is for @angular/router
Description
Router.resetConfig allows you to basically post process router at application startup - e.g. replace static placeholders, translate urls, mass add route data etc.). However you don't get a chance to do this for lazy loaded components.
Describe the solution you'd like
Add some possibility to hook into the RouterConfigLoader
when routes from the child modules are processed (e.g. a provider that would be called with the routes resolved from the just loaded module's injector - https://github.com/angular/angular/blob/master/packages/router/src/router_config_loader.ts#L43).
Describe alternatives you've considered
The way to get around this is implemented in localized-router: https://github.com/Greentube/localize-router/blob/master/src/localize-router-config-loader.ts. This is a hack in the first place and will not work with the new loadChildren syntax.
The solution which would support also the new syntax is here: https://github.com/gilsdav/ngx-translate-router/blob/master/projects/ngx-translate-router/src/lib/localized-router.ts which is an even bigger hack.
/cc @gilsdav @meeroslav Pls comment if you have any thoughts on this.