AngularJS $interval should dynamically in-/ decrease
问题 i just want to use $interval(anyFunction(){}, 1000); But value of 1000 should be variable, too. If i change it by defining a variable, the interval won't change on the view. Could someone post an example how to update the 'speed' of an $interval? Thank you very much. Just in case: my controller: $scope.food = 0; var stop; var farmInterval = 1000; $scope.startFarming = function () { console.log('farming started...'); if (angular.isDefined(stop)) return; stop = $interval(function () { $scope