1.$timeoutDelay Device
Apptest.controller ("main",function($scope, $timeout) { $scope. Pink= "Pink"; $scope. Box= "second box"; $timeout (function() { $scope. Pink= "The first box content, the delay of two seconds after the change"; }; SetTimeout (function() { $scope. Pink= "The first box content, the delay changed after 3 seconds"; $scope. $apply (); // manually update the view },3000);}
2.$intervalTimer
// Timer var timer= $interval (function() { console.log (1);},+); // clears the timer $interval. Cancel (timer);
Click Not Available
<button ng-click= "clickb ()" ng-disabled= "Flag" >{{num}}</button>$scope. Flag=false; $scope. clickb=(function() {$scope. Flag=true; $scope. Num=5; var int= $interval (function() {$scope. num--; if($scope. Num==-1) {$scope. Flag=false; $scope. Num= "Click Countdown 5 Seconds"; $interval. Cancel (int); } },1000);});
AngularJs Delay Timer, timers