Exclude the route from the button actions:
<div *ngFor="let data of allData" routerLink="/view-detail">
<div>
<p>{{data.content}}</p>
</div>
<button>SaveData</button>
<button>ApplyData</button>
</div>
When I click on a button, only the action specific to that button should be performed without navigating to a new page. However, clicking on the div triggers the route, and clicking on the buttons triggers both the route and the button action.
Is there a way to perform a button click action without triggering the route, even when the buttons are nested inside the routerLink?