What's the best way to cancel event propagation between nested ng-click calls?

后端 未结 10 1629
旧时难觅i
旧时难觅i 2020-11-30 18:40

Here\'s an example. Let\'s say I want to have an image overlay like a lot of sites. So when you click a thumbnail, a black overlay appears over your whole window, and a la

10条回答
  •  广开言路
    2020-11-30 19:19

    Use $event.stopPropagation():

    Here's a demo: http://plnkr.co/edit/3Pp3NFbGxy30srl8OBmQ?p=preview

提交回复
热议问题