Skip to content

Commit 8d4e3fd

Browse files
fwielstraJeff Cross
authored andcommitted
docs($location): update paramValue description for search()
search() supports an array for paramValue, but this is not described in the docs.
1 parent 9a82873 commit 8d4e3fd

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/ng/location.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,10 @@ LocationHashbangInHtml5Url.prototype =
369369
* @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or
370370
* hash object. Hash object may contain an array of values, which will be decoded as duplicates in
371371
* the url.
372-
*
373-
* @param {string=} paramValue If `search` is a string, then `paramValue` will override only a
374-
* single search parameter. If the value is `null`, the parameter will be deleted.
372+
*
373+
* @param {(string|Array<string>)=} paramValue If `search` is a string, then `paramValue` will override only a
374+
* single search parameter. If `paramValue` is an array, it will set the parameter as a
375+
* comma-separated value. If `paramValue` is `null`, the parameter will be deleted.
375376
*
376377
* @return {string} search
377378
*/
@@ -525,7 +526,7 @@ function $LocationProvider(){
525526
return html5Mode;
526527
}
527528
};
528-
529+
529530
/**
530531
* @ngdoc event
531532
* @name ng.$location#$locationChangeStart
@@ -541,14 +542,14 @@ function $LocationProvider(){
541542
* @param {string} newUrl New URL
542543
* @param {string=} oldUrl URL that was before it was changed.
543544
*/
544-
545+
545546
/**
546547
* @ngdoc event
547548
* @name ng.$location#$locationChangeSuccess
548549
* @eventOf ng.$location
549550
* @eventType broadcast on root scope
550551
* @description
551-
* Broadcasted after a URL was changed.
552+
* Broadcasted after a URL was changed.
552553
*
553554
* @param {Object} angularEvent Synthetic event object.
554555
* @param {string} newUrl New URL

0 commit comments

Comments
 (0)