I have a <span>
with a ng-click handler inside of an <a>
tag.
<a href="/foo/bar">
<h1>Some title</h1>
<span ng-click="doSomething()">Say Hi!</span>
</a>
When this span is clicked, how can I prevent the <a>
tag from navigating to its location?
Edit: I found the answer - use e.preventDefault();
not e.stopPropagation();
.