angularjs - $scope.$digest() with setTimeout best practices -


can confirm if syntax using $digest() ?

        $scope.onchangecheckbox = function() {             settimeout(function(){                      $scope.filteritems();                     $scope.scrollcollectiontop();                      $scope.$digest();             },500);         } 

are there better ways this?

please use $timeout. automatically call $digest.

$scope.onchangecheckbox = function() {             $timeout(function(){                      $scope.filteritems();                     $scope.scrollcollectiontop();                      //$scope.$digest();             },500);         } 

this real angular way.


Comments