title: Hostlistener wait
body: <p>Is there anyway to listen to custom events in angular 2 in intervals ? like once in  3 seconds ?</p>
  
  <pre><code>export class scrollDirectiveComponent {
      pageNo: any = 1;
      @Input() pageNumber: any;
      @Output() emitPageNumber: EventEmitter&lt;any&gt; = new EventEmitter();
      @HostListener('scroll', ['$event'])
      onScroll(event) {
          console.log('scrolled', event.target.scrollTop);
          let tracker = event.target;
          let limit = tracker.scrollHeight - tracker.clientHeight - 5;
          console.log(event.target.scrollTop, limit);
          if (event.target.scrollTop &gt; limit) {
              this.pageNumber++;
              this.emitPageNumber.emit(this.pageNumber);
          }
      }
  }
  </code></pre>
  
  <p>It keeps on listening to scroll event and the page number is automatically incremented . If one cannot wait then is there anyway in which the scroll bar can be changed to a new position?</p>