Supposably, I have this class:
Class ExampleClass {  
    public firstMethod(){
     // Do something  
    }  
    public secondMethod(){
     //Do something with invoke firstMethod
    }
}
How can I invoke first method from another correctly? (Simple "firstMethod()" is not working).
Use this :
public secondMethod(){
   this.firstMethod();
}
If you want to force the binding to the instance, use the => operator :
secondMethod= () => {
   this.firstMethod();
}
                        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