diff options
Diffstat (limited to 'src/ng/http.js')
| -rw-r--r-- | src/ng/http.js | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/src/ng/http.js b/src/ng/http.js index e7bbb8bc..3aaad7a8 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -222,7 +222,7 @@ function $HttpProvider() {       * will result in the success callback being called. Note that if the response is a redirect,       * XMLHttpRequest will transparently follow it, meaning that the error callback will not be       * called for such responses. -     *  +     *       * # Calling $http from outside AngularJS       * The `$http` service will not actually send the request until the next `$digest()` is       * executed. Normally this is not an issue, since almost all the time your call to `$http` will @@ -409,19 +409,20 @@ function $HttpProvider() {       *           return responseOrNewPromise       *         }       *         return $q.reject(rejection); -     *       }; -     *     } +     *       } +     *     };       *   });       *       *   $httpProvider.interceptors.push('myHttpInterceptor');       *       * -     *   // register the interceptor via an anonymous factory +     *   // alternatively, register the interceptor via an anonymous factory       *   $httpProvider.interceptors.push(function($q, dependency1, dependency2) {       *     return {       *      'request': function(config) {       *          // same as above       *       }, +     *       *       'response': function(response) {       *          // same as above       *       } | 
