1
0123xx元素上的ng-click
指令的事件即使通過它的同級元素input
正在註冊。ng-click事件偵聽器在單擊同級元素時觸發
<div class="list list-inset">
<label class="item item-input">
<button class="button button-small button-icon icon ion-navicon"
ng-click="toggleLeft();$event.stopPropagation();"></button>
<input type="text" placeholder="Search">
</label>
</div>
點擊input
元素也在裏面的任何地方內觸發點擊事件。 我該如何解決這個問題?
我沒有看到這種行爲。也許你需要進一步指定你的問題(提供一個詳細的例子,包括額外的樣式) – Rouby 2015-03-19 07:19:06
@Rouby問題發生是因爲標籤內部的元素。 – 2015-03-19 07:28:48
@Rouby它是一樣的。標記爲重複。 – 2015-03-19 12:50:21