title: ASP.NET with angularJS fails to load template
body: <p>I moved my angularJS application from xampp to ASP.NET Visual Studio. When I load my application I got error message that template files could not be found.</p>
  
  <p>I tried several method but none of them worked... Does someone knows where's the problem?</p>
  
  <p>Screenshot of file hierarchy:</p>
  
  <p><img src="https://i.stack.imgur.com/D1mTM.png" alt="enter image description here"></p>
  
  <p>here is JS code that includes templates:</p>
  
  <pre><code>app.config(function ($routeProvider) {
      $routeProvider
          .when('/contacts',
              {
                  controller: 'ContactsController',
                  templateUrl: '"/home/contacts.html'
              })
          .when('/add-contact',
              {
                  controller: 'ContactAddController',
                  templateUrl: '/home/addContact.html'
              })
          .when('/edit-contact/:contactId',
              {
                  controller: 'ContactEditController',
                  templateUrl: '/home/editContact.html'
              })
          .when('/display-contact/:contactId',
              {
                  controller: 'ContactDetailsController',
                  templateUrl: '/home/displayContact.html'
              })
          .otherwise({ redirectTo: '/contacts' });
  });
  </code></pre>
  
  <p>Here is RouteConfig.cs (I leave it as it was when I created new project)</p>
  
  <pre><code> public class RouteConfig
      {
          public static void RegisterRoutes(RouteCollection routes)
          {
              routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
              routes.MapRoute(
                  name: "Default",
                  url: "{controller}/{action}/{id}",
                  defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
              );
          }
      }
  </code></pre>