带有节点webkit的AngularJS

带有节点webkit的AngularJS,angularjs,node-webkit,Angularjs,Node Webkit,我现在正在评估NodeWebKit,将其作为使用web技术构建桌面应用程序的可能解决方案,但有一个小问题。应用程序正在使用AngularJS,我遇到的问题是似乎没有正确加载我的html模板文件 我的测试应用程序具有以下配置: nucleusApps.config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) { $locationProvider.html5Mode(tr

我现在正在评估NodeWebKit,将其作为使用web技术构建桌面应用程序的可能解决方案,但有一个小问题。应用程序正在使用AngularJS,我遇到的问题是似乎没有正确加载我的html模板文件

我的测试应用程序具有以下配置:

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'});
}]);
问题是我遇到了以下错误:

Failed to load resource     file://templates/core/style.html
我尝试了许多不同的模板URL格式,包括:

./templates/core/style.html
file://template/core/style.html
但我一直在犯这个错误。我的目录结构也是:

-index.html
-package.json
-css
  -file.css
  -etc...
-templates
  -core
    style.html
-etc...
这就是要拉上拉链的东西

你知道我为什么会犯这个错误吗

-更新-


不确定这里发生了什么,但只是更新了我的代码(我正在构建的web版本),现在一切正常。我还没有使用HTML5模式,但问题就出在这里

删除并修复加载失败资源(以及创建路径./templates/corestyle.html),但是我没有收到一个错误,它只是在重复:10$digest()迭代。流产!如果没有其他代码,我猜您是1)在调用scope.$apply,而不是2)更改angular认为您不应该像内部angular构造的东西(比如angular.$$foo)。为什么它在chrome浏览器中工作良好,但在node webkit(使用chrome)中却不工作?嗯,好问题,你可能想研究angularjs Google Group,我似乎记得partials存在一些问题,尤其是chrome。很抱歉,我没有节点webkit exp。不确定这里发生了什么,但只是更新了我的代码(我正在构建的web版本),现在一切正常。在旧代码中一定有些奇怪