We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7555867 commit 24a6f31Copy full SHA for 24a6f31
src/ng/location.js
@@ -414,11 +414,19 @@ var locationPrototype = {
414
*
415
* Return host of current url.
416
417
+ * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.
418
+ *
419
420
* ```js
421
* // given url http://example.com/#/some/path?foo=bar&baz=xoxo
422
* var host = $location.host();
423
* // => "example.com"
424
425
+ * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo
426
+ * host = $location.host();
427
+ * // => "example.com"
428
+ * host = location.host;
429
+ * // => "example.com:8080"
430
* ```
431
432
* @return {string} host of current url.
0 commit comments