Skip to content

Commit a9ba1a6

Browse files
jpsimonsCameron Knight
jpsimons
authored and
Cameron Knight
committed
docs($location): update $location.search() jsdoc signature
Closes angular#8050
1 parent 3717c5b commit a9ba1a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ng/location.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -427,14 +427,17 @@ LocationHashbangInHtml5Url.prototype =
427427
* If the argument is a hash object containing an array of values, these values will be encoded
428428
* as duplicate search parameters in the url.
429429
*
430-
* @param {(string|Array<string>)=} paramValue If `search` is a string, then `paramValue` will
431-
* override only a single search property.
430+
* @param {(string|Array<string>|boolean)=} paramValue If `search` is a string, then `paramValue`
431+
* will override only a single search property.
432432
*
433433
* If `paramValue` is an array, it will override the property of the `search` component of
434434
* `$location` specified via the first argument.
435435
*
436436
* If `paramValue` is `null`, the property specified via the first argument will be deleted.
437437
*
438+
* If `paramValue` is `true`, the property specified via the first argument will be added with no
439+
* value nor trailing equal sign.
440+
*
438441
* @return {Object} If called with no arguments returns the parsed `search` object. If called with
439442
* one or more arguments returns `$location` object itself.
440443
*/

0 commit comments

Comments
 (0)