Stop propagation of underlying ng-click inside a jQuery click event

后端 未结 3 667
夕颜
夕颜 2021-02-02 14:00

A Twitter Bootstrap dropdown is nested inside a tr. The tr is clickable through ng-click. Clicking anywhere on the page will

3条回答
  •  后悔当初
    2021-02-02 14:52

    I would lean towards just calling $event.stopPropagation() from within the template itself. Logic related to events most likely belongs there. Should make unit testing easier as well. Someone looking at the template would also know that the event didn't bubble up without looking at the underlying controller.

提交回复
热议问题