diff options
Diffstat (limited to 'src/ng/http.js')
| -rw-r--r-- | src/ng/http.js | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/ng/http.js b/src/ng/http.js index 708a0650..fbdc89a5 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -548,7 +548,8 @@ function $HttpProvider() {       *      GET request, otherwise if a cache instance built with       *      {@link ng.$cacheFactory $cacheFactory}, this cache will be used for       *      caching. -     *    - **timeout** – `{number}` – timeout in milliseconds. +     *    - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} +     *      that should abort the request when resolved.       *    - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the       *      XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5       *      requests with credentials} for more information. @@ -927,7 +928,7 @@ function $HttpProvider() {          }          resolvePromise(response, status, headersString); -        $rootScope.$apply(); +        if (!$rootScope.$$phase) $rootScope.$apply();        } | 
