title: Base Href and Angular Routing and Views
body: <p>I'm developing a web application which defines the <code>&lt;base href="phoenix/"&gt;</code> in the header as explained <a href="http://www.verdantrefuge.com/writing/2013/angularjs-changing-app-path-base-element/" rel="nofollow">in this article</a>.</p>
  
  <p>The default URL that is mapped is <code>http://localhost/phoenix/</code> however even when defining the base tag in the header my views and routes are not being redirected correct.</p>
  
  <p>I enabled HTML5 routing:</p>
  
  <pre><code>$locationProvider.html5Mode(true);
  </code></pre>
  
  <p>and then defined my route like:</p>
  
  <pre><code>app.config(["$routeProvider", function ($routeProvider) {
      $routeProvider.when('/login', {
          templateUrl: '/views/login.html',
          controller: 'LoginCtrl'
      });
  }]);
  </code></pre>
  
  <p>It tries to resolve it as:</p>
  
  <pre><code> GET http://localhost/views/login.html 404 (Not Found) 
  </code></pre>
  
  <p>It works correctly if I append the base url to the <code>/phoenix/login</code> paths.  Should I have to append that via a variable I set or something or am I missing something and this should work.  Also, is this going to work on say IE8 with the header attribute base?</p>