In a simple app I'm building something like a state service that pulls data from the server fully driven by navigation. This forces me to have proper working routes for every state of the app and keeps my implementation clean and simple.
Core thing in my service is of course to subscribe to NavigationManager.LocationChanged and change the state accordingly. But although NavigationManager.Uri has everything I need, I lack the parsing of route variables that Router provides via RouteData and is available as CascadingParameter in pages and components.
How can I access the current RouteData whenever I handle the NavigationManager.LocationChanged in my service? Or how can I do this differently (react to navigation changes and change my service state accordingly)?