No…what @Gaurav0 is trying to say is… init is technically the class’ constructor. Consider the following piece of over simplified code that shows the execution order.
class Controller {
constructor() {
this.init();
}
init() {
console.log(this.get('model')); // This is your get model
}
}
var instance = new Controller();
instance.set('model', {});
If you follow the execution order, you’ll see that of course model is going to be undefined when you get it.