There is a child component which is used in many pages of an angular web app. The child component has a (click) event which calls a function. Each page that consist of this child component is calling a different function with different parameters on click event.
How can I make this (click) event generic or dynamic that it calls the different function if the parent is different?
// In one component
(click)="saveData(types, functions)"
// On another component
(click)="showFunctions(index, areas, types)"
Using a single child component in multiple pages with different click event, how we can do this?
Thank you in advance.