diff options
| author | Josh Schumacher | 2013-10-15 16:56:09 -0700 | 
|---|---|---|
| committer | Pete Bacon Darwin | 2013-10-24 22:17:50 +0100 | 
| commit | 3b046c9eaafce846ed7973446f376e810c8cc4e1 (patch) | |
| tree | 8ced2073500af7f75c642e15d13fd7c6b647007f /src/ngRoute/route.js | |
| parent | 3c05e36e79365c9dd6996934ed4538fa7f3f220e (diff) | |
| download | angular.js-3b046c9eaafce846ed7973446f376e810c8cc4e1.tar.bz2 | |
docs($routeProvider): document route.resolve rejection
Add documentation that the $routeChangeError event is fired when a
route resolve promise is rejected
Closes #4447
Diffstat (limited to 'src/ngRoute/route.js')
| -rw-r--r-- | src/ngRoute/route.js | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 21459aab..61004b3a 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -89,9 +89,12 @@ function $RouteProvider(){     *        `$location.path()` by applying the current route     *     *    - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should -   *      be injected into the controller. If any of these dependencies are promises, they will be -   *      resolved and converted to a value before the controller is instantiated and the -   *      `$routeChangeSuccess` event is fired. The map object is: +   *      be injected into the controller. If any of these dependencies are promises, the router will +   *      wait for them all to be resolved or one to be rejected before the controller is instantiated. +   *      If all the promises are resolved successfully, the values of the resolved promises are injected  +   *      and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is fired. +   *      If any of the promises are rejected the {@link ngRoute.$route#$routeChangeError $routeChangeError} +   *      event is fired. The map object is:     *     *      - `key` – `{string}`: a name of a dependency to be injected into the controller.     *      - `factory` - `{string|function}`: If `string` then it is an alias for a service. | 
