【发布时间】:2018-04-20 14:40:52
【问题描述】:
我有一个 Ionic v1 项目,我正在对其进行一些改进。
我有一张卡片列表,卡片本身可以点击,让用户了解更多详细信息。我需要在卡片上添加几个按钮,但我无法让按钮捕获点击 - 点击转到卡片 href。示例代码如下。
<div class="list card" ng-repeat="(evtKey, evtObj) in someHash">
<div class="item" ng-click="clickCard(evtKey)">
<div class="row">
<div class="col-20 row-center">
<div> Some stuff here</div>
</div>
<div class="col-80 item-text-wrap">
<div> More stuff here </div>
<div class="row text-center">
<div class="col col-33">
<div> More stuff </div>
</div>
<div class="col col-33">
<button class="button button-small button-stable" ng-click="alert('Yes')">Yes</button>
</div>
<div class="col col-33">
<button class="button button-small button-stable" ng-click="alert('No')">No</button>
</div>
</div>
</div>
</div>
<p class="item-icon-right"><i class="icon ion-chevron-right icon-accessory"></i></p>
</div>
</div>
寻求有关如何使按钮而不是卡片捕获按钮的点击的帮助。到目前为止,我发现的示例都是使用 Ionic v2 及更高版本而不是 v1。
谢谢,
-S
【问题讨论】: