@@ -50,6 +50,29 @@ export interface LocationServices extends Disposable {
50
50
/**
51
51
* Gets the current url string
52
52
*
53
+ * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.
54
+ *
55
+ * For example, the URL may be stored in the hash ([[HashLocationServices]]) or
56
+ * have a base HREF prepended ([[PushStateLocationServices]]).
57
+ *
58
+ * The raw URL in the browser might be:
59
+ *
60
+ * ```
61
+ * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor
62
+ * ```
63
+ *
64
+ * or
65
+ *
66
+ * ```
67
+ * http://mysite.com/basepath/internal/path/123?param1=foo#anchor
68
+ * ```
69
+ *
70
+ * then this method returns:
71
+ *
72
+ * ```
73
+ * /internal/path/123?param1=foo#anchor
74
+ * ```
75
+ *
53
76
*
54
77
* #### Example:
55
78
* ```js
@@ -70,7 +93,9 @@ export interface LocationServices extends Disposable {
70
93
* locationServices.url("/some/path?query=value#anchor", true);
71
94
* ```
72
95
*
73
- * @param newurl The new value for the URL
96
+ * @param newurl The new value for the URL.
97
+ * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.
98
+ * It should not include the protocol, site, port, or base path of an absolute HREF.
74
99
* @param replace When true, replaces the current history entry (instead of appending it) with this new url
75
100
* @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)
76
101
* @return the url (after potentially being processed)
@@ -144,7 +169,7 @@ export interface LocationConfig extends Disposable {
144
169
*/
145
170
host ( ) : string ;
146
171
/**
147
- * Gets the base Href, e.g., `http://localhost/approot`
172
+ * Gets the base Href, e.g., `http://localhost/approot/ `
148
173
*
149
174
* @return the application's base href
150
175
*/
0 commit comments