Here is the use case. Given a stateConfig object, I can access state.url
, but this only returns the URL specified in that configuration object, not the URL that includes the URL's of a state's parents. I need to build the full URL to pass into $urlMatcherFactory.compile, to test for matches.
Fortunately, $state.$current
provides an extended state object, which allows me to iteratively traverse a state's parents and build the full URL for matching. Unforunately, $state.$current
obviously only wraps the current state, but it would be wonderful if I could wrap an arbitrary state in the same way. Any ideas?