Skip to main content
1-Visitor
June 4, 2019
Solved

Repeast a sequence

  • June 4, 2019
  • 1 reply
  • 1662 views

Hi,

 

how can I repeat a sequence? JS code would be appreciated.

 

Many Thanks

Janos

 

Best answer by Janos1987

I found a solution. This is able to play a sequence 10 times in all sec.

 

$scope.startseq = function() {
$scope.intervalPromise = $interval($scope.rotate, 1000, 10); 
};


$scope.stopseq = function() {
$interval.cancel($scope.intervalPromise);
};

1 reply

1-Visitor
June 4, 2019
Hello,

Do you want to repeat a sequence completely or do you want to repeat a step?
Janos19871-VisitorAuthorAnswer
1-Visitor
June 5, 2019

I found a solution. This is able to play a sequence 10 times in all sec.

 

$scope.startseq = function() {
$scope.intervalPromise = $interval($scope.rotate, 1000, 10); 
};


$scope.stopseq = function() {
$interval.cancel($scope.intervalPromise);
};

1-Visitor
June 5, 2019

Very Nice!!!

I'll certainly use that later.

 

Great!!!