I have a button on my navbar. When clicked, I want a different behavior depending on which URI the user is currently on.
Let's say that I have this URI localhost:8080/entity/{entityId}
How can I get entity
, the first part of the URI, as a string in Angular 5.