Got the infinite scroll working. I should see the console.log message in the console when doing this:
onScrollDown() {
console.log('down');
}
There's no message printing in the console. The onScrollDown doesn't work anymore. The error message in the console is as following:

The html file used is as follwing:

This problem might be related to version conflict. I used the dependency before and it works perfectly. The difference is that the ng version has been changed from 0.0.0 to 1.1.5. After updating the ng version, it doesn't work.
I compared the package.json files and those are the things that is different:


The version of the dependency I used has also changed from 0.8.4 to 6.0.0.
Trying to make the infinite scroll work with the data-grid component. It works until the ng version is updated.
+1
@bailanyuan I experienced the same before I realized that per my Angular and rxjs versions, I was trying to use to new a version of ngx-infinite-scroll for my angular version.
I was at Angular ^5.0.0 and rxjs ^5.5.2. It clearly says on the main page "For Angular 4 < v =< 5.5 - use version [email protected]", so with great shame and guilt for having missed that, I installed that and viola.
I resolved it after remembering that rxjs imports can cause weird errors when there are a mix of importing the same augmentations/imports from different locations - ie rxjs vs rxjs/observable, etc. Of course differing versions would likely be an issue also - so this package using rxjs 6 might not play so nicely with older versions of rxjs in apps.
@agscheidle You're right! I forgot to check the rxjs version. I changed the version to 0.8.4 and it works. Thanks for your help! Appreciate it!
That's great! You're welcome. Thanks for letting me know.
Most helpful comment
@bailanyuan I experienced the same before I realized that per my Angular and rxjs versions, I was trying to use to new a version of ngx-infinite-scroll for my angular version.
I was at Angular ^5.0.0 and rxjs ^5.5.2. It clearly says on the main page "For Angular 4 < v =< 5.5 - use version [email protected]", so with great shame and guilt for having missed that, I installed that and viola.
I resolved it after remembering that rxjs imports can cause weird errors when there are a mix of importing the same augmentations/imports from different locations - ie
rxjsvsrxjs/observable, etc. Of course differing versions would likely be an issue also - so this package using rxjs 6 might not play so nicely with older versions of rxjs in apps.