title: angular js get refresh token
body: <p>What i want to do is this:</p>
  
  <p>if im getting 401 response i want to intercept and send another post request to get new token from my server. but i cant do it in the angular interceptor. i get this error:</p>
  
  <p>Circular dependency found: authService &lt;- authIn &lt;- $http &lt;- $translateStaticFilesLoader</p>
  
  <p>whats the problem, and how i can do what i want?</p>
  
  <pre><code>  return {
          'responseError': function(rejection) {
              if (rejection.status === 401) {
                  authService.getNewToken();
                  return $q.reject(rejection);
                  }
                  return $q.reject(rejection);
              }
          };
      }
  </code></pre>