我之前已经问过这个问题,但是我没有看到任何解决方案:
所以我使用Cordova 2.5在iOS 6.1.2上构建一个iPad应用程序
我的app.coffee:
jQuery ->
class window.AppRouter extends Backbone.Router
routes: {
'': 'index',
':parent/:child/': 'childView',
':id/': 'detailView',
},
index: =>
$("#navbar .title").text("Flight Centre's Choices")
view = new fc.main.View
view.render()
childView: (parent, child) =>
view = new fc.main.View(parent:parent, child:child)
view.render()
detailView: (id) =>
view = new fc.main.Detail(id:id)
view.render()
window.app = new AppRouter();
Backbone.history.start();
Run Code Online (Sandbox Code Playgroud)
第一个索引视图成功加载并按预期显示
现在点击其中一个链接让我们说打开childView,它无法加载页面:
2013-03-20 16:56:13.684 Flight[1158:907] Resetting plugins due to page load.
2013-03-20 16:56:13.689 Flight[1158:907] Resetting plugins due to page load.
2013-03-20 16:56:13.694 Flight[1158:907] Failed to load webpage with error: Frame load interrupted
Run Code Online (Sandbox Code Playgroud)
用户点击的链接看起来像这样':
/#/foo/bar/
Run Code Online (Sandbox Code Playgroud)
在Mac上的Chrome浏览器中,一切正常.
我不知道这里发生了什么!!
Har*_*rry 35
该死的这段时间,答案是如此愚蠢和简单.
而不是将html中的链接作为:
/#/foo/bar/
Run Code Online (Sandbox Code Playgroud)
它应该是
#/foo/bar/
Run Code Online (Sandbox Code Playgroud)
这是有道理的,领先/页面将重新加载,这就是为什么我得到了这个错误.
希望它可以帮助某人
| 归档时间: |
|
| 查看次数: |
8760 次 |
| 最近记录: |