AngularJS ng-click on table row but not on a certain td

angularjs, html, javascript

Solution

You can stop event propagation like this:

<td class="not-clickable-cell" ng-click="$event.stopPropagation()">
    cell 3 is not! clickable
</td>

so that when you click this cell event will not bubble up to the `tr` event handler.

Demo: http://plnkr.co/edit/jvh5NKaDsvpPKuSJhzFx?p=preview

Problem

I'm facing an issue when there is an event data-ng-click on table row, but i want that a certain td won't do the event in the row. is it possible to do it? if so, how? example html: ``` <table> <tr data-ng-click="do_some_action()"> <td> cell 1 is clickable </td> <td> cell 2 is clickable </td> <td class="not-clickable-cell"> cell 3 is not! clickable </td> </tr> </table> ```

Original source