url([url]);
This method is getter / setter.
Return url (e.g. /path?a=b#hash
) when called without any parameter.
Change path, search and hash, when called with parameter and return $location
.
// given url http://example.com/#/some/path?foo=bar&baz=xoxo var url = $location.url(); // => "/some/path?foo=bar&baz=xoxo"
Parameters
Param | Type | Details |
---|---|---|
url (optional) | string | New url without base prefix (e.g. |
Returns
string |
url |
Please login to continue.