application base URL stripped of any filename
Optionalhtml5: boolean = trueDefaults to true
Optionalprefix: stringURL path prefix for html5 mode or hash prefix for hashbang mode
Optional_OptionalbaseOptionalhashReturns the hash fragment when called without any parameters.
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 URL (e.g. /path?a=b#hash) when called without any parameter.
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.
OptionalparamValue: string | number | boolean | string[] | nullChanges the hash fragment when called with a parameter and returns $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.
OptionalparamValue: string | number | boolean | string[] | nullIf search is a string or number, overrides only a single search property.
The Location instance.
Change the history state object when called with one parameter and return $location.
The state object is later passed to pushState or replaceState.
See https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#state|History.state
NOTE: This method is supported only in HTML5 mode and only in browsers supporting
the HTML5 History API (i.e. methods pushState and replaceState). If you need to support
older browsers (like IE9 or Android < 4.0), don't use this method.
The Location instance.
Change path, search and hash, when called with parameter and return $location.
New URL without base prefix (e.g. /path?a=b#hash).
The Location instance.
application base URL