Ngx-infinite-scroll: Angular 4.1.0 + TyepScript : Can't bind to 'infiniteScrollDistance' since it isn't a known property of 'div'

Created on 19 Dec 2017  路  5Comments  路  Source: orizens/ngx-infinite-scroll

When I tried to compile using AOT I got these error.

I put the import of InfiniteScrollModule in the app.module.

NOT a bug

Most helpful comment

Had the same issue, make sure that you are also exporting the Module as well as Importing in your module.ts

All 5 comments

this error is not cause because of AOT.
try following the demo code.

Sorry, i did't explain with calrity what happen.
Is the first time that I tried to use ngx-infinite-scroll. I follow the steps, installing and import the InfiniteScrollModule to the main module, I tried to use this code in another module of the poject but when I tried to run this error appear:

Can't bind to 'infiniteScrollDistance' since it isn't a known property of 'div'. ("<div infiniteScroll [ERROR ->][infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()"> ")

This is the code that I use

<div infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()"> </div>

Had the same issue, make sure that you are also exporting the Module as well as Importing in your module.ts

OMG! Hahahaha, Thanks @gregduffield I finally realized what's the matter, how dumb!

Had the same issue, make sure that you are also exporting the Module as well as Importing in your module.ts

Can somebody please explain what this means? Export WHICH module from where and Import WHICH module?

Was this page helpful?
0 / 5 - 0 ratings