Skip to main content
10-Marble
January 9, 2018
Solved

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

  • January 9, 2018
  • 1 reply
  • 3437 views

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

Best answer by tmccombie

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

1 reply

tmccombie21-Topaz IAnswer
21-Topaz I
January 9, 2018

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