title: AngularJS 'scrollTop' equivalent?
body: <p>I'm looking to implement something similar to this in an AngularJS directive:</p>
  <p><a href="https://github.com/geniuscarrier/scrollToTop/blob/master/jquery.scrollToTop.js" rel="nofollow noreferrer">https://github.com/geniuscarrier/scrollToTop/blob/master/jquery.scrollToTop.js</a></p>
  <p>It's fairly straightforward, when you are not at the top of the page it will fade in a button to scroll to the top:</p>
  <pre class="lang-js prettyprint-override"><code>$(window).scroll(function() {
    if ($(this).scrollTop() &gt; 100) {
      $this.fadeIn();
    } else {
      $this.fadeOut();
    }
  });
  </code></pre>
  <p>However I'm having a hard time finding how to get the current scroll location in Angular. I'd rather not have to use jQuery just for this single thing.</p>