title: AngularJS and GitHub Pages - loading templates issue
body: <p>I'm trying to set up <a href="https://github.com/moroshko/seekdeck/tree/gh-pages" rel="nofollow">my Angular app</a> on GitHub pages at <a href="http://moroshko.github.io/seekdeck" rel="nofollow">http://moroshko.github.io/seekdeck</a>.</p>
  
  <p>The Angular routes are defined in <code>application.js</code>:</p>
  
  <pre><code>&lt;html ng-app="SeekDeck"&gt;
    &lt;head&gt;
      ...
      &lt;script src="scripts/application.js"&gt;&lt;/script&gt;
      ...
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div ng-view&gt;&lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><code>application.js</code> is loaded from <code>/seekdeck/scripts</code>, as expected.</p>
  
  <p>My app routes look like this:</p>
  
  <pre><code>// Part of application.js
  $routeProvider
    .when("/", {
      templateUrl: "templates/dashboard/dashboard.html",
      ...
    })
    ...
  </code></pre>
  
  <p>When Angular tries to get the <code>dashboard.html</code> template, it tries to load it from <code>/templates/dashboard</code> rather than <code>/seekdeck/templates/dashboard</code>, and therefore it cannot find it.</p>
  
  <p>Any ideas why is this happening, or how could I fix this?</p>