带有node-webkit的AngularJS
发布时间:2020-12-17 16:59:19 所属栏目:安全 来源:网络整理
导读:我现在正在评估node-webkit作为使用Web技术构建桌面应用程序的可能解决方案,并且存在一些问题.应用程序正在使用AngularJS,我遇到的问题似乎是没有正确加载我的html模板文件. 我的测试应用程序有这个配置: nucleusApps.config(['$locationProvider','$routeP
我现在正在评估node-webkit作为使用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 我为templateUrl尝试了许多不同的格式,包括: ./templates/core/style.html file://template/core/style.html 但我一直收到这个错误.我的目录结构也是: -index.html -package.json -css -file.css -etc... -templates -core style.html -etc... 这是正在压缩的内容. 你知道为什么我会收到这个错误吗? – 更新 – 不知道这里发生了什么,只是更新了我的代码(我正在构建的网络版),现在一切正常.在旧代码中一定是奇怪的东西 解决方法
我还没有使用html5mode,但其中存在问题.
$locationProvider,
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |