Get the name of the current socket if you exit with multiple named routers

In our angular 4 application, we have several named routers. So the URL looks like this:   http: // localhost: 3000 / main / (outletName1: Printers // outletName2: Printers)

Assume that one component is mapped to one specific named socket on the router. The component is injected into the constructor of Router, ActivatedRoute, etc.

How can a component get the router's exit name from those that were entered (or others, if possible)?

+4
source share

Source: https://habr.com/ru/post/1681625/


All Articles