1
Reply

What is Difference $timeout and $interval in angularjs ?

Puneet Kankar

Puneet Kankar

Jul 29, 2017
252
0

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

    Puneet Kankar
    July 29, 2017
    0