cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Repeast a sequence

Janos1987
12-Amethyst

Repeast a sequence

Hi,

 

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

 

Many Thanks

Janos

 

ACCEPTED SOLUTION

Accepted Solutions

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);
};

View solution in original post

3 REPLIES 3

Hello,

Do you want to repeat a sequence completely or do you want to repeat a step?

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);
};

Very Nice!!!

I'll certainly use that later.

 

Great!!!

Announcements

Top Tags