How To Check If The Digest Cycles Have Stabilized (aka "has Angular Finished Compilation?")
tl;dr: The initial question was 'How to trigger a callback every digest cycle?' but the underlying question is much more interesting and since this answers both, I went ahead and m
Solution 1:
I actually do not know if my advice will answer your question, but you could simply pass a listener to the $watch
function which will be called on each iteration:
$rootScope.$watch(function(oldVal, newVal){
// add some logic here which will be called on each digest cycle
});
Have a look here: http://docs.angularjs.org/api/ng/type/$rootScope.Scope#$watch
Post a Comment for "How To Check If The Digest Cycles Have Stabilized (aka "has Angular Finished Compilation?")"