我尝试将我的应用程序 emberjs 版本从 1.0.0 rc8 更新到 1.0.0,但出现路由错误。在我的应用程序路线中,我有这些代码:
OlapApp.ApplicationRoute = Ember.Route.extend({
setupController: function (controller, model) {
this.controllerFor('column').set('model', OlapApp.AxisModel.find());
this.controllerFor('row').set('model', OlapApp.AxisModel.find());
},
renderTemplate: function (controller, context) {
this._super(controller, context);
this.render('application');
this.render('column', {
into: 'application',
outlet: 'column',
controller: 'column'
});
this.render('row', {
into: 'application',
outlet: 'row',
controller: 'row'
});
},
dimenssionTree: function () {
return OlapApp.MeModel.find();
}
});
并得到这个错误:
DEPRECATION: Action handlers contained in an `events` object are deprecated in favor of putting them in an `actions` object (error on <OlapApp.ApplicationRoute:ember314>)
at Object.triggerEvent (file:///F:/OLAP/app/lib/ember.js:30519:13)
at trigger (file:///F:/OLAP/app/lib/ember.js:29641:16)
at handlerEnteredOrUpdated (file:///F:/OLAP/app/lib/ember.js:29537:11)
at file:///F:/OLAP/app/lib/ember.js:29512:9
at eachHandler (file:///F:/OLAP/app/lib/ember.js:29559:9)
at setupContexts (file:///F:/OLAP/app/lib/ember.js:29511:7)
at finalizeTransition (file:///F:/OLAP/app/lib/ember.js:29835:7)
at transitionSuccess (file:///F:/OLAP/app/lib/ember.js:29732:13)
at invokeCallback (file:///F:/OLAP/app/lib/ember.js:8055:19) ember.js:394
Error while loading route: TypeError {} ember.js:394
如果评论这些行:
this.controllerFor('column').set('model',OlapApp.AxisModel.find());
this.controllerFor('row').set('model',OlapApp.AxisModel.find());
我可以看到我的应用程序,但应用程序无法正常工作,我认为这些牵引线有错误。我还从 builds.emberjs.com 将 ember-data 更新到最新版本