I have an angular js app where I put an API link in the UI to which if the user clicks, he or she can enroll for a survey. Everything is fine but the problem is the user is also directed to the API link address that is a new tab opens. I basically want the user to just click it. So in the backend I know the user wants to enroll. But on clicking the link, the user also gets directed to a new tab.
This is my angular js code
<span ng-bind-html="message.link" ng-click="$event.preventDefault();"> </span>
Here it does stop it from going to a new tab but the link itself is not executed. What am I doing wrong?