科尔多瓦热毛巾

时间:2013-05-21 17:09:16

标签: cordova single-page-application durandal cordova-2.0.0 hottowel

我正在尝试配置HotTowel应用程序以使用Apache Cordova / PhoneGap。

我已将index.cshtml复制到index.html,并用html链接标记替换了所有的bundle引用。

问题是当页面最初加载时,它会尝试加载App / views / shell.html并失败说明

  

仅HTTP支持交叉原始请求

这种情况正在发生,因为我在Cordova应用程序中需要运行index.html over file protocol但我不确定如何修复Cross origin请求。

  1. 有没有办法在不使用HTTP的情况下配置Hot Towel / Durandal?

  2. 有没有人成功使用Cordova的Hot Towel?

1 个答案:

答案 0 :(得分:0)

我认为您需要将所有支持文件(例如shell.html)部署到设备中。

您还可以在构建过程中运行durandal优化器,然后只需部署main-built.js,整个应用程序就包含在该文件中。就像这个问题How to execute the Durandal JS optimizer.exe as part of VS2012 build/publish process?

相关问题