11
我有下面的代碼:父DIV也是孩子DIV NG單擊
<table class="table">
<tr>
<th>Name___</th>
</tr>
<tr ng-repeat="app in apps"
ng-click="go('/editApp/' + plugin.name);">
<td>
<span>{{app.name}}</span>
</td>
<td style="width: 100px;">
<i class="glyphicon glyphicon-pencil"
ng-click="openPopup(app)"></i>
</td>
</tr>
</table>
當我點擊OpenPopup,也是go()方法燒製,我怎麼能做到這一點,如果我點擊彈出窗口彈出只會觸發?
從'tr' – Lekhnath
能很好地去除'NG-click',如果你點擊你實際上點擊過其父過一個子元素。這被稱爲**事件傳播**,尤其是**事件冒泡** –