title: $scope variable does not update within $interval function
body: <p>I am using <code>$interval</code> for my custom stopwatch. Within the <code>$interval</code> function I have a variable <code>$scope.inputValue</code> which is binded to a range. The problem is that after each iteration of <code>$interval</code> (every 500ms), the most recent $scope.inputValue is not taken into account, but only the value at the initialization (1000).</p>
  
  <p>How to solve this?</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>.controller('DashCtrl', function($scope, $interval) {
  
      var interval, incrementTimer;
  
      $scope.inputValue       = 1000;
  
      //
      //
      incrementTimer = function() {
          userValue = $scope.inputValue; 
          console.log(userValue); // does not update when range changes
      };
  
  
      //
      // button toggle
      $scope.toggleTimer = function() {
          interval = $interval(incrementTimer, 500);
      };
  
  })
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;input type="range" min="0" max="2000" step="100" ng-model="inputValue"&gt;
  
  &lt;button class="button button-positive" ng-click="toggleTimer()"&gt;Start&lt;/button&gt;
  </code></pre>