ember rc1,ember-data rev 12。我所有其他路由都正确加载,不确定为什么我会看到这个错误。当我尝试访问显示路线即 /files/groups/5 时会发生这种情况。索引路线呈现良好。
我在下面粘贴了堆栈跟踪,但信息量不是很大。我在这里做的事情基本上是错的吗?
我的路线/控制器设置如下:
this.resource('files', { path : '/files' }, function() {
this.resource('groups', { path : '/groups' }, function() {
this.route('show', { path : '/:asset_link_group_id' });
});
});
AssetLinksApp.GroupsShowController = Ember.ArrayController.extend({
content : Ember.A(),
assetLinkGroup : null
});
AssetLinksApp.GroupsShowRoute = AssetLinksApp.AuthRequiredRoute.extend({
setupController : function(controller,model) {
controller.set('content',model.get('asset_links'));
controller.set('assetLinkGroup',model);
},
model : function(params) {
return AssetLinksApp.AssetLinkGroup.find(params.asset_link_group_id);
}
});
堆栈跟踪:
加载路由时出错:TypeError {} exchange_vendor.js:12078
(匿名函数) exchange_vendor.js:12078 Ember.Router.reopenClass.defaultFailureHandler.setup exchange_vendor.js:35011 失败 exchange_vendor.js:34448 objects.concat.context exchange_vendor.js:34497 invokeCallback exchange_vendor.js:17846 Promise.then exchange_vendor。 js:17893 EventTarget.trigger exchange_vendor.js:17822 结果 exchange_vendor.js:17924 RunLoop._prev exchange_vendor.js:15911 Ember.handleErrors exchange_vendor.js:12140 调用 exchange_vendor.js:15909 iter exchange_vendor.js:15981 RunLoop.flush exchange_vendor。 js:16035 RunLoop.end exchange_vendor.js:15940 tryable exchange_vendor.js:16143 Ember.tryFinally exchange_vendor.js:12831 Ember.run.end exchange_vendor.js:16146 Ember.tryFinally exchange_vendor.js:12833 Ember.run exchange_vendor.js: 16102 Ember.HashLocation.Ember.Object.extend。onUpdateURL exchange_vendor.js:36690 jQuery.event.dispatch exchange_vendor.js:3144 jQuery.event.add.elemData.handle.eventHandle