How can I convert current URL to the corresponding state? The result state will be used for state transition using $state.go.
Example: http://localhost/auth/enterprise/
Registered route:
{
"stateName": "auth.context",
"url": ":context"
}
Result: auth/enterprise/ => auth.context
Example: http://localhost/auth/enterprise/esdrubal
Registered route:
{
"stateName": "auth.context",
"url": ":context/:username"
}
Result: auth/enterprise/esdrubal => auth.context