In a few script I can find for instance
$timeout(function () { $scope.my = 1; });
instead of simply
$scope.my = 1;
What's the purpose to call $timeout without delay?
This is a hack. :) But usually the intention is to wait until the end of the $digest cycle and then set $scope.my to 1. Timeouts are called after all watches are done.
$digest
$scope.my
1
2.1m questions
2.1m answers
60 comments
57.0k users