We have a typescript class,which contains few methods. Sample example of the TypeScript class.
export class AppointmentListComponent implements OnInit {
editEvent(event: IEvent): void {
this._router.navigate(['/appointments', event.id]);
}
}
We want to call editEvent method from another (.js) file. How can we achieve this.