This is a slightly old issue, but something I am seeing as well.. I see the 
response returning looking at my watch, but get undefined in the then(). 
Did you ever find out what happened? Thanks!

On Saturday, August 16, 2014 at 9:10:22 PM UTC-5, Darin Hensley wrote:
>
> Using Restangular, the get method/promise resolves but the result handed 
> to .then() is empty...with console.log(data); showing undefined. I checked 
> the network tab in chromium debug and the xhr request is good with 200 
> success...there is a full json response in the body. Any ideas why the 
> result isn't containing the body/payload?
>
>  
> angular.module('main.loadbalancer').service('NodeService', function(
> $stateParams, Restangular, LoadBalancerService) {
>
>
>   return {
>
>
>     createNode: function(node) {
>           var account = "7436";
>           var eventId = "0fd6afd9-237-4aa0-a5c9-ff0b3e60ddcf";
>           account = Restangular.one("account", account);
>           account.one("event", eventId).get().then(function(data) {
>               console.log(data);
>                }, function(data) {
>                    console.log(data);
>                }); 
>
>
>     }
>
>
>   };
> });
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to