Recently I purchased a code and after analyzing I found a strange code.
Here $timeout(angular.noop) was used something like refresh.
I mean if I delete $timeout(angular.noop) ng-repeat list is not refreshed.
I also tried to change $timeout(angular.noop) to angular.noop but not working.
Is there anyone who knows exact functionality of $timeout(angular.noop)?
Basically, that line evaluates changes between models and views and update UI and Model to be in sync.
As it's explained in more detail here
$timeout calls rootScope.$apply() which calls rootScope.$digest() but without the risk of getting digest is already in progress error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With