What would be the way to use promises inside interceptor of angular's 
resource? In my current code I have following:

        interceptor: {
          response: function (response) {
            return $http.get(...).then(function (data) {
              angular.extend(response.resource, data); // copy all from 
newly acquired object
            });
          }
        }

but this seems to have a side effect - 'then' function of $save() doesn't 
contain data:
var rc = new MyResource({title: "title"});
rc.$save().then(function (data) {
// data is undefined here...
});

I wonder if I'm using promises incorrectly in interceptor.
Thanks

-- 
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