I am communicating from angular app to server side for data. The server creates a token and sends it into the header. I am looking for ways to intercept the response using Restangular and save it in the localStorage. I haven't been successful.
I was doing something like this in my app .config
RestangularProvider.addResponseInterceptor('HttpInterceptor');
and then in the HttpInterceptor I was calling the Storage to store the Header. But I am getting several errors and couldn't figure out this.
Thanks in advance!