@@ -35,9 +35,9 @@ function $RouteProvider(){
35
35
*
36
36
* * `path` can contain named groups starting with a colon (`:name`). All characters up
37
37
* to the next slash are matched and stored in `$routeParams` under the given `name`
38
- * when the route matches .
38
+ * after the route is resolved .
39
39
* * `path` can contain named groups starting with a star (`*name`). All characters are
40
- * eagerly stored in `$routeParams` under the given `name` when the route matches .
40
+ * eagerly stored in `$routeParams` under the given `name` after the route is resolved .
41
41
*
42
42
* For example, routes like `/color/:color/largecode/*largecode/edit` will match
43
43
* `/color/brown/largecode/code/with/slashs/edit` and extract:
@@ -83,7 +83,9 @@ function $RouteProvider(){
83
83
* - `factory` - `{string|function}`: If `string` then it is an alias for a service.
84
84
* Otherwise if function, then it is {@link api/AUTO.$injector#invoke injected}
85
85
* and the return value is treated as the dependency. If the result is a promise, it is resolved
86
- * before its value is injected into the controller.
86
+ * before its value is injected into the controller. Be aware that `ngRoute.$routeParams` will
87
+ * still refer to the previous route within these resolve functions. Use `$route.current.params`
88
+ * to access the new route parameters, instead.
87
89
*
88
90
* - `redirectTo` – {(string|function())=} – value to update
89
91
* {@link ng.$location $location} path with and trigger route redirection.
0 commit comments