click on router link angular code code example
Example 1: call a function whenever routerlink is clicke angular
<a class="nav-link" [routerLink]="['/home']" (click)="doSomeLogic()">Home</a>
Example 2: home page routing in angular
const routes: Routes = [
{ path: 'home_page_path', component: HomePageComponent }
];
add this in app routing file
/*
I Hope it will Help You.
Namaste _/\_
*/