diff options
| author | Pete Bacon Darwin | 2013-06-11 22:15:54 +0100 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-06-11 22:15:54 +0100 |
| commit | c9c3f718e2564a6cc13f958a777ebb4ba9ce5de5 (patch) | |
| tree | 5f7f8faa79b69c800e8e517f8b885737ac68999b /src/ngRoute/route.js | |
| parent | b6ff8d751f6d76d8a03d01562279d47886c98c66 (diff) | |
| download | angular.js-c9c3f718e2564a6cc13f958a777ebb4ba9ce5de5.tar.bz2 | |
docs(ngRoute): clarify when gets updated
Diffstat (limited to 'src/ngRoute/route.js')
| -rw-r--r-- | src/ngRoute/route.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 32b7c626..de0d9016 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -35,9 +35,9 @@ function $RouteProvider(){ * * * `path` can contain named groups starting with a colon (`:name`). All characters up * to the next slash are matched and stored in `$routeParams` under the given `name` - * when the route matches. + * after the route is resolved. * * `path` can contain named groups starting with a star (`*name`). All characters are - * eagerly stored in `$routeParams` under the given `name` when the route matches. + * eagerly stored in `$routeParams` under the given `name` after the route is resolved. * * For example, routes like `/color/:color/largecode/*largecode/edit` will match * `/color/brown/largecode/code/with/slashs/edit` and extract: @@ -83,7 +83,9 @@ function $RouteProvider(){ * - `factory` - `{string|function}`: If `string` then it is an alias for a service. * Otherwise if function, then it is {@link api/AUTO.$injector#invoke injected} * and the return value is treated as the dependency. If the result is a promise, it is resolved - * before its value is injected into the controller. + * before its value is injected into the controller. Be aware that `ngRoute.$routeParams` will + * still refer to the previous route within these resolve functions. Use `$route.current.params` + * to access the new route parameters, instead. * * - `redirectTo` – {(string|function())=} – value to update * {@link ng.$location $location} path with and trigger route redirection. |
