Current route
Access information about the active route via ICurrentRoute.
ICurrentRoute
is a dependency injection token that exposes details of the route that is currently active. The instance is updated whenever navigation finishes so that you can inspect the active path, URL and query information from any component or service.
ICurrentRoute
has the following shape:
To use it, inject the token and read its properties:
The parameterInformation
array mirrors the hierarchy of viewport instructions of the current navigation. It allows you to inspect route parameters and nested routes programmatically.
Last updated
Was this helpful?