Javascript 升级Ember v.1.5后未加载应用程序
我已经从1.4版更新了我的ember 1.5版。之后,我的应用程序将无法呈现。 在我的应用程序中,我在很多地方使用了_super()。这会造成问题吗。我也在使用require.js 我通过应用程序进行调试,找到了它触发的indexRoute。但在那之后什么也没有发生。下面是我的路线结构 路线图:Javascript 升级Ember v.1.5后未加载应用程序,javascript,ember.js,ember-data,ember-testing,Javascript,Ember.js,Ember Data,Ember Testing,我已经从1.4版更新了我的ember 1.5版。之后,我的应用程序将无法呈现。 在我的应用程序中,我在很多地方使用了_super()。这会造成问题吗。我也在使用require.js 我通过应用程序进行调试,找到了它触发的indexRoute。但在那之后什么也没有发生。下面是我的路线结构 路线图: 根据发行说明,.\u super()的工作方式与以前一样,因此没有问题。另外,通过注释掉setup/require部分,您的示例也很好。除非thatSuper.call(self,context)代码部
根据发行说明,.\u super()的工作方式与以前一样,因此没有问题。另外,通过注释掉setup/require部分,您的示例也很好。除非
thatSuper.call(self,context)在require
中的code>代码部分出现调用\u super
的情况,如本文所述,您能否缓慢地缩减此应用程序的功能集,以查看它在什么时候重新开始工作?您可以先尝试一个类似hello world的应用程序,使用您的requireJS设置,看看增加的复杂性是否是问题的根源
App.Router.map(function() {
this.resource('public', { path: '/public' }, function() {
this.route('login');
this.route('logout');
});
});
Ember.Router.reopen({
transitionTo : function(name, param) {
.......
//Handling my own code here
.......
this._super(name);
}
});
App.BaseRoute = Ember.Route.extend({
setup : function(context) {
var thatSuper = this._super;
require(_rp, function() {
.......
//Handling my own code here
.......
thatSuper.call(self, context);
........
}, function(error){
...Handling error.....
});
},
renderTemplate : function(router, context) {
window.scrollTo(0, 0);
}
});
App.IndexRoute = App.BaseRoute.extend({
redirect : function() {
this.transitionTo('public.login');
}
});
App.PublicLoginRoute = App.BaseRoute.extend({
renderTemplate : function(router, context) {
this._super(router, context);
this.render('publicLogin', {
into : 'applicationHBS',
outlet : 'appBODY'
});
}
});