I have a click Event on a table row and in this row there is also a delete Button with a click Event.(我在表行上有一个单击事件,在这一行中还有一个带有单击事件的删除按钮。)
When i click the delete button the click Event on the row is also fired.(当我单击删除按钮时,也会触发该行上的事件。)
Here is my code.(这是我的代码。)
<tbody>
<tr ng-repeat="user in users" class="repeat-animation" ng-click="showUser(user, $index)">
<td>{{user.firstname}}</td>
<td>{{user.lastname}}</td>
<td>{{user.email}}</td>
<td><button class="btn red btn-sm" ng-click="deleteUser(user.id, $index)">Delete</button></td>
</tr>
</tbody>
How can I prevent that the showUser
Event is fired when i click the delete Button in the table cell?(当我单击表格单元格中的删除按钮时,如何防止showUser
事件被触发?)
ask by michael_knight translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…