title: Angular HTTP interceptor executed for embedded ng-templates
body: <p>I have an Angular interceptor working:</p>
  
  <pre class="lang-js prettyprint-override"><code>factory('myHttpInterceptor', function ($q, $location, $rootScope) {
  // do something
  return function (promise) {
      return promise.then(function (response) {
          // do something
          return response;
      }, function (response) {
          // do something
          return $q.reject(response);
      });
  };
  })
  </code></pre>
  
  <p>and one big html file which contains templates like <code>&lt;script type="text/ng-template" id="home-template"&gt;</code>. Unfortunately  my HTTP interceptor intercepts not only loading HTTP requests but also loading templates (which are already loaded in html file) for controllers which are defined like <code>when('/', {controller:MainController, templateUrl:'home-template'})</code>. Is there a way how to make interceptor intercepting only HTTP requests or how to recognize whether I am loading something from server or just a template?</p>