I was looking for a way to get the current route without parameters.
I found this answer for example: Get current route without parameters
Like you can see there are many workarounds but no one of them is simple and clear.
When I was using "location.path()" I noticed thet it uses "BrowserPlatformLocation.pathname()" that contains the "current route without parameters".
So the question is:
How can I extend functionality from "BrowserPlatformLocation".