jonsamwell / angular-http-batcher

Enables HTTP batch request with AngularJS
MIT License
96 stars 28 forks source link

" $digest already in progress " Error comes when request callback is called #11

Closed deepsaurabh closed 9 years ago

deepsaurabh commented 9 years ago

Digest error is coming from angularJs file , when callback is called .

 this.request.callback(result.statusCode, result.data, result.headerString, result.statusText); 
jonsamwell commented 9 years ago

Does this happen all the time or in specific scenarios?

jonsamwell commented 9 years ago

What is the code in the callback?

deepsaurabh commented 9 years ago

It is happening as 2 of the calls in batch of 4 are failing. The code in the call back is from angular.min.js file -

function e(a, b, c) {
                       m && (200 <= a && a < 300 ? m.put(q, 
                       [a, b, Ob(c)]) : m.remove(q));
                       f(b, a, c);
                       i.$apply()
                   }

as soon as i.$apply() is called digest error is coming

jonsamwell commented 9 years ago

That will call your call back - could you try it without any code in your then function? I can't seem to replicate it which indicates it is something in your code

jonsamwell commented 9 years ago

Closing as no replies to my questions. Please re-open if you still need help

deepsaurabh commented 9 years ago

It was resolved by updating the version of angular. thanks