Answer the question
In order to leave comments, you need to log in
How to interrupt a click on a link in Angular?
There is a link: It is <a href="http://">Link</a>
necessary that when the link is clicked, a certain handler is executed. But the link didn't open. But at the same time, you need to keep the ability to navigate through it if the user opens the link in a new tab, or if he has disabled JS.
In jQuery it was done like this:
$('a').click(function() {
// code
return false;
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question