I installed ngx infinite scrolling ngx-InfiniteScroll using :
npm install ngx-infinite-scroll --save
In my app.module I added :
import {InfiniteScrollModule} from 'ngx-infinite-scroll';
And in my imports I added :
imports: [
BrowserModule,
FormsModule,
AppRoutingModule,
BrowserAnimationsModule,
InfiniteScrollModule,
NgbModule.forRoot()
]
And then in my component.ts I added again :
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
In my html I have :
<div class="col-md-12 tableDiv" infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="100" (scrolled)="onScroll()">
/*table with content here */
And the error I get is that infiniteScrollDistance isn't a known property of 'div', and can't bind to it . What I am doing wrong ? What step am I missing ? I have used it before and it has worked. But now I can't seem to get it to do so. Any hint ?