title: .NET web API calls are getting intercepted by angular js UI Router, returning HTML instead of calling API
body: <p>I have an angularjs app, that sits on top of an MVC5 app and an WEB API backend. I am using UI Router for the Angular js routing and for now, have removed ALL $urlRouterProvider.when and $urlRouterProvider.otherwise calls, but still when I try to do a $http:get... it is returning the default home page in the data object and not hitting the service. </p>
  
  <p>My routing is like this:</p>
  
  <pre><code>(function () {
  angular.module("OdinSPA")
      .config([
          "$urlRouterProvider", "$stateProvider", "$httpProvider", "$locationProvider", function ($urlRouterProvider, $stateProvider, $httpProvider, $locationProvider) {
              $locationProvider.hashPrefix("!").html5Mode(true);
              $stateProvider
                  .state("start", {
                      url: "/start",
                      templateUrl: "/Search/dashboard"
                  })
                  .state("guru", {
                     ...
                  });
  
  
              $httpProvider.interceptors.push("AuthHttpResponseInterceptor");
          }
      ]);
  })();
  </code></pre>
  
  <p>My angularjs service is this...</p>
  
  <pre><code>                function updateHistory() {
                  return $http.get(urlBase + "/" + textUpdate.Id + "/standardreport/history", textUpdate).
                      success(function(data, status, headers, config) {
                          logoutResponse(data, status, headers, config);
                      }).
                      error(function (data, status, headers, config) {
                          logoutResponse(data, status, headers, config);
                      });
              };
  </code></pre>
  
  <p>But all that is returned in the data parameter is the entire HTML for the home page (which I won't post as it's pointless) and a 200 status code... </p>
  
  <p>There is only one other article that mentions this problem but the only answer is by the same person and talks about EF, which I don't believe is the issue here!!</p>