I am currently evaluating node-webkit as a possible solution for building a web-based desktop application and has a small problem. The application uses AngularJS, and the problem I am facing is apparently the incorrect loading of the html template files.
My test application has this configuration:
nucleusApps.config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) { $locationProvider.html5Mode(true); $routeProvider .when('/style', { templateUrl: '/templates/core/style.html', controller: nucleusApps.controllers.Style }) .otherwise({redirectTo: '/style'}); }]);
The problem is that I get the following error:
Failed to load resource file://templates/core/style.html
I tried several different formats for templateUrl, including:
./templates/core/style.html file://template/core/style.html
But I keep getting this error. Also my directory structure:
-index.html -package.json -css -file.css -etc... -templates -core style.html -etc...
This is what is encrypted.
Do you know why I can get this error?
- UPDATE -
Not sure what is going on here, but just updated my code (the web version that I am creating) and now everything is working fine. There must be something strange in the older code.
source share