Within the component:
myFunction(): void {
this.myOtherFunctoin(this._myService.serviceMethod);
}
private myOtherFunction(func : Function){
func();
}
Regarding service calls:
serviceMethod(){
this.somethingMethod(); // "this" is coming as undefined in debugger
this.somethingVariable = true;
}
I am trying to pass a method as a parameter similar to using delegates in C#. Am I making a mistake here?