title: How does AngularJS's $watch function work?
body: <p>I'm reading a lot about AngularJS nowadays, and I came across that magical $watch function. I understand how to use it, but I wonder how is it implemented in the background. Is it a time interval function? Or is it Angular calling this watch every statement executed?</p>
  
  <p>I don't want to dig into the source code right now, and I would glad if one of you already know the answer and want to share his knowledge about the subject.</p>
  
  <p>Thanks.</p>