Skip to content

Commit 5e88789

Browse files
committed
fix(docs): Explain return value of rule as function
1 parent e07a794 commit 5e88789

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/urlRouter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
8888
*
8989
* // Example of using function rule as param
9090
* $urlRouterProvider.otherwise(function ($injector, $location) {
91-
* ...
91+
* return '/a/valid/url';
9292
* });
9393
* });
9494
* </pre>
9595
*
9696
* @param {string|object} rule The url path you want to redirect to or a function
9797
* rule that returns the url path. The function version is passed two params:
98-
* `$injector` and `$location` services.
98+
* `$injector` and `$location` services, and must return a url string.
9999
*
100100
* @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance
101101
*/

0 commit comments

Comments
 (0)