How To Use $http In Interceptor In Angular JS

When you include the $http variarble in your Interceptor function, you most likely will get a Circular Dependency error message in the Javascript console.

The solution is to use the $injector object instead since this holds the $http object. Do it like this:

Now, you should be able to use the $http object from within your Interceptor.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *