title: Angular ngx infinite scroll not detecting window scroll
body: <p>HTML -</p>
  <pre><code>&lt;div class=&quot;search-results&quot; infiniteScroll [infiniteScrollDistance]=&quot;2&quot; [infiniteScrollThrottle]=&quot;50&quot; (scrolled)=&quot;onScroll()&quot; [scrollWindow]=&quot;true&quot;&gt;
  </code></pre>
  <p>TS-</p>
  <pre><code>onScroll() {
    this.skip = this.skip + this.limit;
    if (this.totalCount &gt; 2) {
      this.service.details(this.id, this.skip, this.limit, this.stime, this.etime)
        .subscribe((res: any) =&gt; {
            this.data = this.data.concat(res.data.data.rec);
            this.cd.detectChanges();
          },
          (error) =&gt; {
            this.cd.detectChanges();
          });
    }
  }
    
  </code></pre>
  <p>Have imported &quot;InfiniteScrollModule&quot; in module and defined in TS as well.
  When I give this div some height and apply overflow then it works.
  But it is not working on window scroll.
  It was working before but now i dont know what happened.
  PS. I am new to angular.
  Can someone help?</p>