我使用jquery mobile进行开发和新项目我决定使用多个文件。
index.html
locations.html
rewards.html
我是这样成功链接网页的。
index -> locations -> rewards
我可以在我的locations.html页面加载时动态加载数据,但在点击locations.html页面上的链接后,无法将动态内容加载到我的rewards.html页面。
ajax调用工作正常,我可以通过控制台看到内容加载,但内容没有加载到页面上。
我在location.html页面上成功使用了jquery移动列表视图,无法在rewards.html页面上加载列表视图。
希望这有道理..
答案 0 :(得分:0)
cordova应用程序中的多个HTML文件存在的问题是,每个新文件都必须像index.html一样进行管理。
这意味着,你必须在每个文件中包含cordova.js,你的jQuery mobile JS,你的app.js,...当然,你必须再次等待cordova-和jQuery-deviceready-event。
这就是为什么单页应用程序管理起来要简单得多的原因。