Conversation
|
Hi DbInit, Thanks for this pull request. We are very interested in having a solution to this problem, but there are few issues with this proposal, so we can't accept it in this form. I am hoping that you could address these so that we can get this in.
In the current implementation this is not the cases: If the request is cached it will resolve immediately https://github.com/angular/angular.js/blob/master/src/ng/http.js#L731 But the way promises resolve the .then only gets called on next $digest() see the nextTick implementation here: https://github.com/angular/angular.js/blob/master/src/ng/q.js#L155 The following behavior will be a surprise to the developer and is incorrect: cache = $cacheFactory(); Another issue is that we need httpBackend mock implementation to support aborting as well. See https://github.com/angular/angular.js/blob/master/src/ngMock/angular-mocks.js#L817 I am going to close this PR to keep our PR queue clean. Please reopen it once you have fixed this use case. |
|
Thanks Miško, Was the general approach acceptable (adding the abort method to the promise)? Also, right now I've based this on the 1.0.x branch, but I realize that's probably reserved for bug fixes. Should I rebase this to master?
|
This is an attempt at resolving issue #1159. Let me know what you think.