From 45eca9ce7c9f1d67d18050a06345e0ecaeb90f13 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Wed, 23 Sep 2015 01:28:43 +0200 Subject: [PATCH] showcase: returning from success or error (legacy promises) doesn't resolve promise --- angularjs/showcase/src/showcase/app/cars/cars.service.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/angularjs/showcase/src/showcase/app/cars/cars.service.js b/angularjs/showcase/src/showcase/app/cars/cars.service.js index 838678f..f69f0b3 100644 --- a/angularjs/showcase/src/showcase/app/cars/cars.service.js +++ b/angularjs/showcase/src/showcase/app/cars/cars.service.js @@ -109,6 +109,9 @@ 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) { @@ -156,6 +159,9 @@ 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) { -- 2.1.4