title: Angular 2+ scroll with HostListener or window.pageYOffset?
body: <p>For better performance, which syntax shoul'd i use in Angular 2+? Why use HostListener when is easy to get the scroll position with onscroll window event and pageYOffset?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@HostListener('window:scroll', ['$event']) onWindowScroll($event) { 
    this.scrollPosition = $event.target.children[0].scrollTop;
    console.log("scrollPosition:" + this.scrollPosition)
  };</code></pre>
  </div>
  </div>
  </p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>ngAfterViewInit(){
    window.onscroll = function() {
       var currentScrollPos = window.pageYOffset;
       console.log("current:" + currentScrollPos);
    }
  }</code></pre>
  </div>
  </div>
  </p>