application base URL stripped of any filename
Optionalhtml5:
boolean
= true
Defaults to true
Optionalprefix:
string
URL path prefix for html5 mode or hash prefix for hashbang mode
OptionalbaseOptionalhashReturn the current hash fragment.
The current hash fragment.
Returns the path of the current URL.
Returns the search part of the current URL as an object.
The current search object.
Returns the current history state object.
Return the current URL (for example,
/path?a=b#hash).
The current path/search/hash string.
Parse given HTML5 (regular) URL string into properties
HTML5 URL
Attempts to parse a clicked link into an app-relative URL update.
Set the hash fragment and return $location.
New hash fragment.
The Location instance.
Changes the path parameter and returns
$location.
New path.
Sets the search part of the current URL as an object.
New search params as a string or object.
The Location instance.
Set the history state object and return
$location. The state object is cloned by
the browser when the scheduled history update commits.
See
https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#state|History.state
Supported only in HTML5 mode. State-only changes are scheduled just like URL changes.
The Location instance.
Set the path, search, and hash, then return
$location.
New URL without base prefix (e.g.
/path?a=b#hash).
The Location instance.
application base URL