My angular application contains an anchor tag that has an associated handler routerLinkand click:
<a [routerLink]="/abc" (click)="onClick"> </a>
I would like it to routerLinkbe used when the user right-clicks and selects "Open in new tab."
The handler clickshould start if the user just left-clicks the link. In this case, I do NOT want to routerLinkcause a route change.
Inside my click handler, I tried to abort the click event, i.e.
public onClick(event: MouseEvent): {
event.preventDefault();
event.stopPropagation();
event.stopImmediatePropagation();
}
routerLink /abc. click routerLink?