i want stop this function with a button, what can i do for that working ?
Thanks
var module = angular.module('numberApp', []);
module.controller('NumberController', function($scope, $timeout) {
(function update() {
$timeout(update, 1000 * 15);
$scope.randomNumber = Math.floor(Math.random()*($scope.max-$scope.min+1)+$scope.min);
}());
please help me to stop this function with a button ;-)
Aucun commentaire:
Enregistrer un commentaire