BatmanJS:深度嵌套路由

BatmanJS: deeply nested routes

本文关键字:路由 嵌套 深度 BatmanJS      更新时间:2023-09-26

我想知道是否有人能用这样的东西:

  @resources 'projects', ->
    @resources 'tables', ->
      @resources 'items'

具有相应的视图内容,如:

%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标记中项目的名称显示正确。我的路线出了问题。有人知道BatmanJS中的多个嵌套路由吗?

已确认,它的深度不会超过两个级别。没有超过两个级别的测试,所以这可能是设计的。