title: Angular JS & Node Webkit Routing
body: <p>I am building an app using node-webkit and Angular-JS and I am having the following problem:</p>
  
  <p>The app <strong>works fine in chrome</strong>, but when compiled into node, most routes lead to an file-listing page. If I run the external debugger, I don't get an error in the console (using chrome devtools), however I do notice that when I click a link it takes me to "file://C:/#/link" rather than "file://C:/subfolder/subfolder2/#/link" like it should. </p>
  
  <p>Do I need to tell node-webkit to set the correct base-url?</p>
  
  <p>A simple example of my setup is:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="app"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Main Page&lt;/title&gt;
  &lt;link href="css/style.css" rel="stylesheet" type="text/css" /&gt;
  &lt;/head&gt;
  &lt;body ng-cloak ng-controller="ClockController"&gt;
  &lt;div id="nav"&gt;
  &lt;a href="/#/link/1"&gt;Link 1&lt;/a&gt;
  &lt;a href="/#/link/2"&gt;Link 2&lt;/a&gt;
  &lt;a href="/#/link/3"&gt;Link 3&lt;/a&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Routes JS:</p>
  
  <pre><code>"use strict";
  
  angular.module('app')
  .config([
      '$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
          $routeProvider
              .when('/', {
                  templateUrl: 'home.html',
              })                
              .when('/link/:linkid', {
  
                      templateUrl: function($stateParams) {
                          return 'link_'+ $stateParams.linkid +'.html';
                      }
              })
              .otherwise({redirectTo: '/'});
        }
  ]);
  </code></pre>