$location.port()

port(); This method is getter only. Return port of current url. // given url http://example.com/#/some/path?foo=bar&baz=xoxo var port = $location.port(); // => 80 Returns Number port

$locationProvider

$location provider in module ng Use the $locationProvider to configure how the application deep linking paths are stored. Methods hashPrefix([prefix]); Parameters Param Type Details prefix (optional) string Prefix for hash part (containing path and search) Returns * current value if used as getter or itself (chaining) if used as setter html5Mode([mode]); Parameters Param Type Details mode (optional) booleanObject If boolean, sets html5Mode.enabled to value. If object,

$location.replace()

replace(); If called, all changes to $location during the current $digest will replace the current history record, instead of adding a new one.

$location.$locationChangeStart

$locationChangeStart Broadcasted before a URL will change. This change can be prevented by calling preventDefault method of the event. See $rootScope.Scope for more details about event object. Upon successful change $locationChangeSuccess is fired. The newState and oldState parameters may be defined only in HTML5 mode and when the browser supports the HTML5 History API. Type: broadcast Target: root scope Parameters Param Type Details angularEvent Object Synthetic event object. newU

$location.hash()

hash([hash]); This method is getter / setter. Returns the hash fragment when called without any parameters. Changes the hash fragment when called with a parameter and returns $location. // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue var hash = $location.hash(); // => "hashValue" Parameters Param Type Details hash (optional) stringnumber New hash fragment Returns string hash

$location.path()

path([path]); This method is getter / setter. Return path of current url when called without any parameter. Change path when called with parameter and return $location. Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing. // given url http://example.com/#/some/path?foo=bar&baz=xoxo var path = $location.path(); // => "/some/path" Parameters Param Type Details path (optional) stringnumber New path Returns string path

$location.host()

host(); This method is getter only. Return host of current url. Note: compared to the non-angular version location.host which returns hostname:port, this returns the hostname portion only. // given url http://example.com/#/some/path?foo=bar&baz=xoxo var host = $location.host(); // => "example.com" // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo host = $location.host(); // => "example.com" host = location.host; // => "example.com:8080" Returns

$location.absUrl()

absUrl(); This method is getter only. Return full url representation with all segments encoded according to rules specified in RFC 3986. // given url http://example.com/#/some/path?foo=bar&baz=xoxo var absUrl = $location.absUrl(); // => "http://example.com/#/some/path?foo=bar&baz=xoxo" Returns string full url

$location.$locationChangeSuccess

$locationChangeSuccess Broadcasted after a URL was changed. The newState and oldState parameters may be defined only in HTML5 mode and when the browser supports the HTML5 History API. Type: broadcast Target: root scope Parameters Param Type Details angularEvent Object Synthetic event object. newUrl string New URL oldUrl (optional) string URL that was before it was changed. newState (optional) string New history state object oldState (optional) string History s

$interval.cancel()

cancel([promise]); Cancels a task associated with the promise. Parameters Param Type Details promise (optional) Promise returned by the $interval function. Returns boolean Returns true if the task was successfully canceled.