I have a variable called LangDataService.isDataReady
that is a Promise wawiting to be resolved. Upon resolve some logic will happen. How can I pass this into that Promise?
LangDataService.isDataReady.then(function () {
this.modalOn()
});
I know i can cache var self_ = this;
but I'm curious of other alternatives?
LangDataService.isDataReady.then(function () {
this.modalOn()
}.bind(this));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With