</div>
` }) export class AppComponent { selector: string = '.main-panel';
onScroll() { console.log('scrolled!!'); } } `
with [infiniteScrollContainer]="'.main-panel'"
Regards!
Closed dan085 closed 4 years ago
I have the same issue but using Angular 8. I have installed ngx-infinite-scroll@^8.0.0 like documentation says. I tried to reproduce the same demo exposed here without success. Only works if use a container like a div and set [scrollWindow]="false" and overflow: scroll in style but if I try to use with browser scroller onScroll event never fired. Any idea?
I solve it setting [infiniteScrollContainer]="selector" where selector is the main container that have scroll style. Like documentation says, I was missing that I have implemented infiniteScroll in smaller component which in turn is contained by the principal.
@hnakao
I use this code that not work
`import { Component } from '@angular/core';
@Component({
selector: 'app',
styles: [
.main-panel { height: 100px; overflow-y: scroll; }
],
template: `
</div>
` }) export class AppComponent { selector: string = '.main-panel';
onScroll() { console.log('scrolled!!'); } } `
with [infiniteScrollContainer]="'.main-panel'"
Regards!
I have problem with child controller inside the home view style youtube in the container
Is "main-panel" the main container? I suggested find the main panel that contain your component and set in you infiniteScrollContainer property. Also, I know that scrollWindow is true by default but set it too just in case [scrollWindow]=''true".
For example, I create my component with infinite scroll but my theme base have a main container with base-container class, you can see that inspecting your html.
I have the same issue as the author described. Even the example code does not work. So i edited an Stackblitz, which was running on angular 7 and updated it to 9, using ngx-infinite-scroll 8.0.2 (btw: documentation says, that we should use v9, but its not released now).
The error on Stackblitz is:
Error in /turbo_modules/@angular/compiler@9.1.1/bundles/compiler.umd.js (28588:43) this.getExtraNgModuleProviders is not a function
hi. version 9 has been released and should address that.
Your issue may already be reported!
Please search on the issue track before creating one.
Expected Behavior
when try to scroll down not work the functions and not call console.log('scrolled!!');
Actual Behavior
Possible Solution
Steps To Reproduce / Demo (if applicable)
[ ] Please share a stackblitz or plunkr demo reproducing this issue
Context
Your Environment