showcase: returning from success or error (legacy promises) doesn't resolve promise
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 22 Sep 2015 23:28:43 +0000 (01:28 +0200)
committergustavo <gu.martinm@gmail.com>
Tue, 22 Sep 2015 23:28:43 +0000 (01:28 +0200)
angularjs/showcase/src/showcase/app/cars/cars.service.js

index 838678f..f69f0b3 100644 (file)
         console.log('XHR SuccessAlternative for getAll. SuccessAlternative, status: ' + status);
         console.log('XHR SuccessAlternative for getAll. SuccessAlternative, headers (it is a function): ' + headers);
         console.log('XHR SuccessAlternative for getAll. SuccessAlternative, config: ' + config);
+        // IT IS WEIRD, BUT RETURNING FROM THIS METHOD IS USELESS BECAUSE IT DOESN'T DO ANYTHING,
+        // IT WON'T RESOLVE OUR PROMISE!!!!
+        // return data;
       }
 
       function error(reason) {
         console.log('XHR ErrorAlternative for getAll. ErrorAlternative, status: ' + status);
         console.log('XHR ErrorAlternative for getAll. ErrorAlternative, headers (it is a function): ' + headers);
         console.log('XHR ErrorAlternative for getAll. ErrorAlternative, config: ' + config);
+        // IT IS WEIRD, BUT RETURNING FROM THIS METHOD IS USELESS BECAUSE IT DOESN'T DO ANYTHING,
+        // IT WON'T RESOLVE OUR PROMISE!!!!
+        // return data;
       }
 
       function notify(notification) {