我有一个嵌套的edit
路线:
@resource 'dashboard.communities.community', path: ':community_id', ->
@route 'edit'
在我的路线中,我尝试使用modelFor
检索模型:
CivicSourcing.DashboardCommunitiesCommunityEditRoute = Ember.Route.extend
model: (params, queryParams, transition) ->
@modelFor('community')
但这会返回undefined
。但是,父路由成功检索community
。知道可能会发生什么吗?
答案 0 :(得分:1)
您的资源名称为dashboard.communities.community
而不是community
@modelFor('dashboard.communities.community')
以下是colors.cool