I am new to Angular 2. I wrote below code in Angular
export class TestClass {
constructor() {
this.initMap();
}
initMap() {
this.marker.addListener('dragend', this.onMarkerDrop);
}
onMarkerDrop(event) {
this.functionTwo(); // Getting error this.functionTwo is not a function
}
functionTwo() {
}
}
Note: Before asking this question I searched in stackoverflow I got these links
'this.function' is not a function - OO JS
this.function is not a function :typescript
Angular - this.function is not a function
They are saying that use Arrow functions to call other member functions. But I don't know how to implement their suggestions in my code. Might I didn't understood them correctly.
I want help from you like, how to call this.functionTwo() using arrow function from functionOne();
Thank you for your help.