This method is getter only.
This method is getter only.
full url representation with all segments encoded according to rules specified in RFC 3986.
This method is getter / setter.
This method is getter / setter. Changes hash fragment when called with parameter and return $location.
New hash fragment
hash fragment when called without any parameter.
This method is getter / setter.
This method is getter / setter. Changes hash fragment when called with parameter and return $location.
hash fragment when called without any parameter.
This method is getter only.
This method is getter only. Note: compared to the non-angular version location.host which returns hostname:port, this returns the hostname portion only.
host of current url.
This method is setter.
This method is setter.
New path
a reference to self
This method is getter.
This method is getter.
path of current url when called without any parameter.
This method is getter only.
This method is getter only.
port of current url.
This method is getter only.
This method is getter only.
protocol of current url.
If called, all changes to $location during current $digest will be replacing current history record, instead of adding new one.
This method is getter / setter.
This method is getter / setter. Return search part (as object) of current url when called without any parameter. Change search part when called with parameter and return $location.
New search params - string or hash object. When called with a single argument the method acts as a setter, setting the search component of $location to the specified value. If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url.
If search is a string or number, then paramValue will override only a single search property. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
If called with no arguments returns the parsed search object. If called with one or more arguments returns $location object itself.
This method is getter / setter.
This method is getter / setter. Change the history state object when called with one parameter and return $location. The state object is later passed to pushState or replaceState.
State object for pushState or replaceState
the history state object when called without any parameter.
This method is getter.
This method is getter.
url (e.g. /path?a=b#hash) when called without any parameter.
This method is setter.
This method is setter.
New url without base prefix (e.g. /path?a=b#hash)
url (e.g. /path?a=b#hash) when called without any parameter.
Location - The $location service parses the URL in the browser address bar (based on the window.location) and makes the URL available to your application.
https://docs.angularjs.org/api/ng/service/$location