how to add click function after routerlink angular code example
Example: call a function whenever routerlink is clicke angular
<a class="nav-link" [routerLink]="['/home']" (click)="doSomeLogic()">Home</a>
<a class="nav-link" [routerLink]="['/home']" (click)="doSomeLogic()">Home</a>