1
Reply

What is Difference $timeout and $interval in angularjs ?

Puneet Kankar

Puneet Kankar

7y
276
0
Reply

    $timeout- $timeout is used to call a function and schedules a single call to the function . It calls another java script function after a certain time.Example - $scope. Show = function() {alert("Hii");}$timeout( function(){ $scope.show(); }, 5000);$interval-$interval is used to call a function and schedules repeated calls to the function . It calls another java script function after a certain time.$scope. Show = function() {alert("Hii");}$interval( function(){$scope.Show(); }, 5000);