There is the following DOM in angularjs
<p class="parent" ng-click="fun()">
<p class="child"> </p>
</p>
I want ng-click
to only fire when p.parent
is clicked, and not when p.child
is clicked.
I can also write complex methods, which can be achieved by judging the clicked element.
I hope it can be implemented in a simple way, preferably the function of angularjs
itself. Please enlighten me.
$event.stopPropagation()