我有以下路线:
@resource 'menus', (->
@resource 'menu', {path: ':menu_id'}, ( ->
@resource 'menu_pages', ( ->
@resource 'menu_page', {path: ':menu_page_id'}
)
)
)
我正在尝试转换到嵌套路由,如下所示:
firstMenuPage = App.MenuPage.find(1)
@transitionToRoute 'menu_page', firstMenuPage
但我收到以下错误:
Uncaught Error: assertion failed: Cannot call get with 'id' on an undefined object.
有谁知道发生了什么?
谢谢