I have the following code in an Ember 1 app:
MyAPP.reopen({
ready: function() {
this._super();
var ChapterView = this.__container__.lookupFactory("view:course/left-nav-chapter");
ChapterView.reopen( {
toggle: function() {
this._super();
var expanded = this.get("expanded");
if(expanded) {
// do something
}
}
});
}
});
This code is wrapped in a script tag in a HTML page that contains the Ember application. I’m reopening my main app in order to change the toggle function from a particular element.
I’m trying to adapt this to an Ember 2 application:
MyAPP2.reopen({
ready: function() {
this._super();
console.log('ready?')
}
});
It seems that the ready function is never triggered. I looked the docs and it seems that reopen is still something valid, but not sure if this is a Ember 2 thing.
Any thoughts here?
Thanks in advance