javascript - How can I detect Touchend or end of changing a range value? - Stack Overflow

I'm using AngularJS with Ionic Framework. I'm developing a live munication application.I have

I'm using AngularJS with Ionic Framework. I'm developing a live munication application.

I have a range slider ionic docu. If I use ng-change every step calls my callback, but I only want to transfer the end result. On desktop I can use ng-mouseup but I can't find a solution on mobile devices. Creating a delay is no solution for me because it must be fast.

I'm using AngularJS with Ionic Framework. I'm developing a live munication application.

I have a range slider ionic docu. If I use ng-change every step calls my callback, but I only want to transfer the end result. On desktop I can use ng-mouseup but I can't find a solution on mobile devices. Creating a delay is no solution for me because it must be fast.

Share asked Nov 5, 2014 at 17:25 mrmowmrmow 818 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

You can try to use the on-release event directive Ionic provides. The example below is untested, but should give you an idea.

http://ionicframework./docs/api/directive/onRelease/

Markup

<div class="range">
  <i class="icon ion-volume-low"></i>
  <input type="range" name="volume" ng-model="temp.volume" on-release="onRelease()">
  <i class="icon ion-volume-high"></i>
</div>

Controller

angular.module('App').controller(function ($scope) {
  $scope.onRelease = function () {
    $scope.volume = $scope.temp.volume;
  };
});

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745051051a4608388.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信