[AngularJS] Re: when digest cycles run

2014-02-16 Thread Daniel Tabuenca
Your list is fine, but I question the usefulness of compiling an exhaustive list of every time that $digest is called, especially since third-party directives could add additional services and callbacks which would add to your list. Quite simply, in a properly written application $digest will b

Re: [AngularJS] Re: when digest cycles run

2014-02-16 Thread Mark Volkmann
My motivation for enumerating these is to finally understand what is happening beneath the covers. I understand that any code could call $apply or $digest on the scope for other circumstances. I think it's really useful when explaining to others how dirty checking works in Angular to be able to pro

Re: [AngularJS] Re: when digest cycles run

2014-02-16 Thread Daniel Tabuenca
I agree “thread of execution” is probably not the most accurate description, I guess what I meant is more “the current stack of execution”. Any angular user code will be triggered by some browser event, and the event handler is responsible of wrapping any further calls inside a $scope.$apply