我已经从v1.4更新了我的ember v1.5 . 之后,我的应用程序没有得到渲染 . 在我的应用程序中,我在很多地方使用_super() . 这会有问题吗?我也在使用require.js .
我通过app调试,然后找到了它触发的indexRoute . 但在那之后什么也没发生 . 以下是我的路线结构,
Route Map:
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'
});
}
});