Answer the question
In order to leave comments, you need to log in
Accessing this from callback?
c
class PopOverTemplate {
elem: JQuery;
private callback(el: JQuery) {
console.log(this);
this.elem = el;
}
constructor(path: string) {
Utils.loadTemplate(path, this.callback);
}
};
$.get()
, in pure JS this is solved by a declaration like var _this = this;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question