I have this in my angular.module('main', []).config():

RestangularProvider.setBaseUrl("" + API_BASE_URI + "1.0/loadbalancers");
  return RestangularProvider.addResponseInterceptor(function(data, operation
) {
    switch (operation) {
      case 'get':
          return data.load_balancer_data;
      case 'post':
        return data.event_id;
      default:
        return data;
    }
  });


In a service, I am trying to reset the addResponseInterceptor() back to 
default behavior:

angular.module("main.loadbalancer").factory("StatusTrackerRestangular", 
function(Restangular) {
    return Restangular.withConfig(function(RestangularConfigurer) {
        RestangularConfigurer.addResponseInterceptor(function(data){
            return data;
        }); 
    });
});


But not having success. How can I get addResponseInterceptor back to 
default?



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