angular - Ionic 2范围touchend事件

标签 angular range ionic2

我试图在输入结束时使用 Ionic 2 获取范围 slider 的值。

doumentation唯一可用的事件是 ionChange,它在输入过程中触发多次,我只需要最后一个值来执行操作。

我尝试手动添加 touchend 事件,但该事件被忽略了。

这里还有一个 Plunker与问题。

<ion-range (ionChange)="showVal($event)" (touchend)="presentValue(event)" min="0" max="100" [(ngModel)]="currentTime" color="danger">
          <ion-icon small range-left name="sunny"></ion-icon>
          <ion-icon range-right name="sunny"></ion-icon>
     </ion-range>

有人知道在 Ionic 2 的范围 slider 上监听 touchend 事件的方法吗?

最佳答案

在您可以使用的范围输入上还有 ionBlurionFocus 事件。

ionFocus 在您滑过范围时触发 当您释放范围项时 ionBlur 被触发

<ion-range (ionBlur)="rangeBlurred($event)" (ionFocus)="rangeFocused($event)">

关于angular - Ionic 2范围touchend事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40744980/

相关文章:

javascript - 为什么我的 Polymer iron 图标出现在我的导航纸输入下方?

android - 在 Docker 中使用 Angular 7 编译 Ionic 4 时出错

mysql - 是否有可能在 mysql 中创建选择系列?

go - 为什么我无法更改类型结构范围内的值?

javascript - 将光标包裹在可内容编辑的 div 中的 html 中

node.js - Ionic2 应用程序从 Mac 移至 PC 导致构建问题

angular - Ionic 4/Angular 6 - 使用拦截器在 401/403 上重定向登录页面

javascript - 如何从 Angular 2 的内部组件中路由?

android - Html/CSS Display flex 和 align-items center 在 Galaxy Note 3 上不起作用

angular - 如何使用 *ngFor 迭代对象键