Skip to main content
10-Marble
Jan 9, 2018 5:34 PM UTC
Solved

How do I add a simple 10 second delay after a button is pressed?

This is what i have tried:


$scope.step2=function() {

      pause(10000);

      $scope.view.wdg['bar-sm']['visible']=false;

     }


The script stops after pause, but does not move to next command

tmccombieAnswer
21-Topaz I
Jan 9, 2018 7:24 PM UTC

You can use $timeout to achieve this. Check out the AngularJS documentation for more information: AngularJS

1 reply

tmccombie21-Topaz IAnswer
21-Topaz I
Jan 9, 2018 7:24 PM UTC

You can use $timeout to achieve this. Check out the AngularJS documentation for more information: AngularJS

Translate