Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1c47abc

Browse files
FGasperNarretz
authored andcommitted
docs($location): clarify return value for path method
docs for return of path() inaccurately describe the function’s return when a value is passed in. Closes #14544
1 parent 5222703 commit 1c47abc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/location.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ var locationPrototype = {
482482
* ```
483483
*
484484
* @param {(string|number)=} path New path
485-
* @return {string} path
485+
* @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter
486486
*/
487487
path: locationGetterSetter('$$path', function(path) {
488488
path = path !== null ? path.toString() : '';

0 commit comments

Comments
 (0)