I need to access some method in a typescript class from an inner function. The inner function obviously has a different namespace, so just using this.outerMethod() doesn´t work.
So I used a variable to reference the outer 'this':
let ref = this;
...
function innerFunction(){
ref.outerMethod();
}
but it just says 'self is undefined'.
On top of that, the outer method I need to call sometimes refers to class properties, which then are also in the outer namespace.
What do I have to do to successfully reference the outer method inside an inner function?