title: AngularJS - templateUrl path appended to href path
body: <p>I'm setting up a very simple AngularJS application and am running into a minor, yet frustrating, issue.  Here is the sample application using $routeProvider:</p>
  
  <pre><code>angular.module('thought', [], function($routeProvider, $locationProvider) {
      $routeProvider.
          when('/thought', {
              templateUrl: 'partials/thought/posts.html',
              controller: ThoughtCntl
          }).
          when('/thought/edit/:id', {
              templateUrl: 'partials/thought/edit.html',
              controller: EditCntl
          }).otherwise({
              redirectTo: '/thought'
          });
  
      $locationProvider.html5Mode(true);
  });
  </code></pre>
  
  <p>Here is the content of posts.html:</p>
  
  <pre><code>&lt;div&gt;
  &lt;button&gt;Create&lt;/button&gt;
  
  &lt;div&gt;
      &lt;h3&gt;Posts&lt;/h3&gt;
      &lt;ul&gt;
          &lt;li ng-repeat="post in publishedPosts"&gt;
              &lt;a href="/thought/edit/{{post._id}}"&gt;{{post.title}}&lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I navigate to /thought, posts.html loads with the appropriate data content.  The the  link contains 'href=localhost:8080/thought/edit/1234' as it should.  However, when I click the link, it attempts to load the template from 'localhost:8080/thought/edit/partials/thought/edit.html'.  The templateUrl path is appended to the href path.  I'm sure that something simple is mis-configured, but I can't find it.  Any ideas what I should look at?</p>
  
  <p>Thanks!</p>