diff options
Diffstat (limited to 'src/service/xhr.bulk.js')
| -rw-r--r-- | src/service/xhr.bulk.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/service/xhr.bulk.js b/src/service/xhr.bulk.js index 33c9384b..bf5a1d95 100644 --- a/src/service/xhr.bulk.js +++ b/src/service/xhr.bulk.js @@ -11,9 +11,8 @@ * * @example */ -angularServiceInject('$xhr.bulk', function($xhr, $error, $log){ - var requests = [], - scope = this; +angularServiceInject('$xhr.bulk', function($rootScope, $xhr, $error, $log){ + var requests = []; function bulkXHR(method, url, post, success, error) { if (isFunction(post)) { error = success; @@ -82,6 +81,6 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){ } }); }; - this.$watch(function() { bulkXHR.flush(); }); + $rootScope.$watch(function() { bulkXHR.flush(); }); return bulkXHR; -}, ['$xhr', '$xhr.error', '$log']); +}, ['$rootScope', '$xhr', '$xhr.error', '$log']); |
