I'm trying to put some anchors (<a>
elements) within a larger clickable element (also <a>
), which is a routerLink.
A simplified layout:
<div>
<a [routerLink]="['/details', item.id]">
<div>Lots of visual elements...</div>
<div><a href="https://wikipedia.org">click here for more info...</a></div>
</a>
</div>
Looks like the outside [routerLink] intercepts all clicks within, so wikipedia link still navigates to details view, although it displays a wikipedia address on hover. The same happens even if the nested link is also a [routerLink].
Is there a way to suppress the outside [routerLink] when clicking on the nested link?