# Input range stops updating by $interval when I change it's value by dragging

**URL:** <https://forum.ionicframework.com/t/input-range-stops-updating-by-interval-when-i-change-its-value-by-dragging/55932>\
**Category:** ionic-v1\
**Created:** [June 27, 2016, 2:28pm UTC](https://forum.ionicframework.com/t/input-range-stops-updating-by-interval-when-i-change-its-value-by-dragging/55932 "2016-06-27T14:28:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bayat](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Bayat](https://forum.ionicframework.com/u/Bayat)\
**Post date:** [June 27, 2016, 2:28pm UTC](https://forum.ionicframework.com/t/input-range-stops-updating-by-interval-when-i-change-its-value-by-dragging/55932/1 "2016-06-27T14:28:44Z")

</div>

Hello everyone.  
I’m using angular $interval with cordova-media-plugin to create a seek bar with ionic range component.  
It works fine. But whenever I seek to a position by dragging. The interval stops updating the value of seek\_value.  
####HTML Code:

```auto
<div class="item range range-positive">
    <small class="light">{{ song_time }}</small>
    <input type="range" name="seek-bar" min="0" max="{{ song_time_seconds }}" ng-model="seek_value" ng-change="updateSeeker({{ seek_value }})">
    <small class="light">{{ position }}</small>
</div>

```

#### JS Code

(it runs when players starts)

```auto
$interval(function(){
    $rootScope.track.getCurrentPosition(
        function (position) {
            $scope.seek_value = window.Math.floor(position);
            $scope.position = convertToCorrectFormat(window.Math.floor(position));
        }
    );
}, 500);

```

And this is code for ng-change:

```auto
$scope.updateSeeker = function(val){
    $rootScope.track.seekTo(val * 1000);
    $scope.seek_value = val;
};

```
