Common click for ion-avatar on multiple pages


I have avatars on multiple pages which on tapped navigates to the profile page. Currently I have click event handlers on each page that does the job.

How can I make the implementation cleaner so that there’s just 1 common method for all pages?


creating a wrapper component for ion-avatar should help i guess