title: Execute Function After Every Digest Loop Before DOM Render
body: <p>I would like to execute a piece of code after every $digest loop, after the DOM has been constructed, but before the render. I want this on <em>every</em> $apply, not just the ones after linking/compiling. Where do I add my code?</p>
  
  <p>I am not going to provide my particular use case because I would like to know how to do this in general. If you would like to help me with my particular problem, I have a separate question: <a href="https://stackoverflow.com/questions/17887828/resize-iframe-to-remove-scrollbars">Resize IFRAME to Remove Scrollbars</a></p>