Trevor Trevor - 1 year ago 114
AngularJS Question

How can I get the full url of the current ui-router state?

I'm using ui-router for AngularJS; I'm handling the

event, and trying to get the full path (after '#') for the current state.
returns an empty string and
returns only the portion of the path that applies to the nested state.

My full path

$state.url == "/b"
$locadtion.hash() == ""

How can I get

Ben Ben
Answer Source

You can always use:




(if that's what you want).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download