Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var call1 = $http({url: 'http://www.foobar.com', cache:'false'
- }).then(function(response1){
- //process response1
- return response1
- },function(response){
- //process error
- }) ;
- var call2 = $http({url: 'http://www.foobar.com', cache:'false'
- }).then(function(response2){
- //process response2
- return response2
- },function(response){
- //process error
- }) ;
- $q.all([call1,call2]).then(function(response){
- for (var x=0,x<response.length;x++) {
- //process response1 and response2
- }
- return processedResponses ;
- }
- // Because call1 and call2 are pretty much identical, I should see the same data twice in "processedResponses" - and I am.
- // however in the inspector/debug tool I am only seeing ONE call to http://www.foobar.com when I am expecting to see two calls
- //
- // Thus is call2 not actually happening because call1 is cached and thus response2 is simply pulled from response1???
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement