title: AngularJS: watch element visibility
body: <p>I have an element inside my body which is invisible. I want to trigger a function when it become visible. What is the best practice for this?</p>
  
  <p>here is a <a href="http://embed.plnkr.co/gBq3M2qHvEjLaGRrRGJO/preview" rel="nofollow noreferrer">plunker</a> to a sample work. In this piece of code, the window should scroll to the '#hiddenObj' div by clicking on the button. but the first click, just the div become visible and the second time the window scrolls.</p>