我想知道是否有人可以使用这样的东西:
@resources 'projects', ->
@resources 'tables', ->
@resources 'items'
相应的 View 内容如:
%a{"data-bind" => "table.name", "data-route" => "routes.projects[project].tables[table]"}
%div{"data-foreach-item" => "project.table.items"}
%p{"data-bind" => item.name"}
%a.btn{"data-route" => "routes.projects[project].tables[table].items[item]"} View details »
这里的问题是链接标签:
Uncaught DevelopmentError: Couldn't find a route for the name items!
但是p标签中的item名称显示正确。我的路线有问题。有人知道 BatmanJS 中的多个嵌套路由吗?
最佳答案
已确认,深度不超过两层。没有超过两个级别的测试,所以这可能是设计使然。
关于javascript - bat 侠JS : deeply nested routes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12235182/