@@ -61,7 +61,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
6161 * });
6262 * </pre>
6363 *
64- * @param {object } rule Handler function that takes `$injector` and `$location`
64+ * @param {function } rule Handler function that takes `$injector` and `$location`
6565 * services as arguments. You can use them to return a valid path as a string.
6666 *
6767 * @return {object } `$urlRouterProvider` - `$urlRouterProvider` instance
@@ -97,7 +97,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
9797 * });
9898 * </pre>
9999 *
100- * @param {string|object } rule The url path you want to redirect to or a function
100+ * @param {string|function } rule The url path you want to redirect to or a function
101101 * rule that returns the url path. The function version is passed two params:
102102 * `$injector` and `$location` services, and must return a url string.
103103 *
@@ -126,7 +126,9 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
126126 * @methodOf ui.router.router.$urlRouterProvider
127127 *
128128 * @description
129- * Registers a handler for a given url matching. if handle is a string, it is
129+ * Registers a handler for a given url matching.
130+ *
131+ * If the handler is a string, it is
130132 * treated as a redirect, and is interpolated according to the syntax of match
131133 * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).
132134 *
@@ -155,7 +157,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
155157 * </pre>
156158 *
157159 * @param {string|object } what The incoming path that you want to redirect.
158- * @param {string|object } handler The path you want to redirect your user to.
160+ * @param {string|function } handler The path you want to redirect your user to.
159161 */
160162 this . when = function ( what , handler ) {
161163 var redirect , handlerIsString = isString ( handler ) ;
0 commit comments