🚀 feature request
Relevant Package
This feature request is for @angular/router
Description
First, big thanks for https://github.com/
/pull/23459 and fixing the issue of supporting lazy loaded aux routes. The introduction of the EmptyOutletComponent indeed fixes the issue, however I noticed a missing capability, which is that we can no longer get reference to the *true* activated component. i.e. When using the (activate) event on router-outlet to get reference to the component instance in the outlet, these named outlets now return an EmptyOutletComponent (correctly) and there is no way to easily get the instance of the actual underlying activated component. It would be nice if we could additionally have a way to get a reference to the router matched component instead of or in addition to the empty outlet component.
Describe the solution you'd like
Simply emit the underlying router matched component INSTEAD of the the EmptyOutletComponent so that developers using the (activate) event on their named outlet will get the expected component instead of an EmptyOutletComponent reference.
Describe alternatives you've considered
An alternative solution would be to simply merge activate events from the router outlet inside the empty outlet component into the man named outlet's activate events and have developers filter for the one that they want (e.g. type of component != EmptyOutletComponent)
🚀 feature request
Relevant Package
This feature request is for @angular/routerDescription
First, big thanks for https://github.com//pull/23459 and fixing the issue of supporting lazy loaded aux routes. The introduction of the EmptyOutletComponent indeed fixes the issue, however I noticed a missing capability, which is that we can no longer get reference to the *true* activated component. i.e. When using the (activate) event on router-outlet to get reference to the component instance in the outlet, these named outlets now return an EmptyOutletComponent (correctly) and there is no way to easily get the instance of the actual underlying activated component. It would be nice if we could additionally have a way to get a reference to the router matched component instead of or in addition to the empty outlet component.Describe the solution you'd like
Simply emit the underlying router matched component INSTEAD of the the EmptyOutletComponent so that developers using the (activate) event on their named outlet will get the expected component instead of an EmptyOutletComponent reference.Describe alternatives you've considered
An alternative solution would be to simply merge activate events from the router outlet inside the empty outlet component into the man named outlet's activate events and have developers filter for the one that they want (e.g. type of component != EmptyOutletComponent)