我有以下StateManager:
App.wrapperView = Em.ContainerView.create();
App.wrapperView.append();
App.states = Em.StateManager.create({
rootView: App.wrapperView,
initialState: "loading",
loading: Em.ViewState.create({
view: App.LoadingView,
enter: function() {
this._super() // _super is not defined.
// other stuff goes here
}
})
});
因此,我无法维持添加行为。
我该怎么办?
答案 0 :(得分:3)
enter: function(manager, transition) {
this._super(manager, transition);
}
此处有更多信息:http://docs.emberjs.com/#doc=Ember.StateManager&src=false
答案 1 :(得分:1)
我通常这样做:
this._super(...arguments);
它打字较少,并被转换为
this._super.apply(this, arguments);