class NewObj{
constructor(){
this.some_var = "Some var"
this.func()
}
func(){
let sub_func = () => {
console.log(this)
}
sub_func()
}
}
new NewObj();
// В терминале:
// node test.js
// -> NewObj { some_var: 'Some var' }
var config = new App.Models.Config(option, data);
config.fetch();
new App.Views.Config({model: config});
var config = new App.Models.Config(option, data);
Promise.resolve(config.fetch()).then(function () {
new App.Views.Config({model: config});
}, App.ajaxError);