84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
在angularjs中有以下的DOM
<p class="parent" ng-click="fun()"> <p class="child"> </p> </p>
我想要ng-click只在点击p.parent时触发,在点击p.child时不触发。复杂的方法我也会写,通过判断点击元素可以实现。我希望能用简单的方法实现,最好是angularjs本身的功能。请大神赐教。
ng-click
p.parent
p.child
angularjs
认证高级PHP讲师
$event.stopPropagation()
$event.stopPropagation()