Skip to content

Commit 0bd2efb

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 angular#14544
1 parent 938bd45 commit 0bd2efb

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)