I'm submitting a ... (check one with "x")
Current behavior:
i want to do something when the window scroll, add the common code like below ,it not work:
@HostListener('window:scroll', ['$event'])
onWindowScroll(event) {
console.log("scrolling .....");
}
Expected behavior:
Steps to reproduce:
Related code:
@HostListener('window:scroll', ['$event'])
onWindowScroll(event) {
console.log("scrolling .....");
}
Hi @zhengmh010, try setting withScroll=''false" for nb-layout as per documentation (https://akveo.github.io/nebular/#/docs/components/layout) to move the scrollbars back to window so that you can listen to that events.
@nnixaa, the @HostListener scroll event isn't firing. The template is something like this:
<div class="container">
<div class="material-navbar"> ... </div>
<nb-layout withScroll="false">
<nb-layout-column> ...rows... </nb-layout-column>
</nb-layout>
</div>
Is the syntax correct?
There's something called windowMode according to the documentation. Setting windowMode="false" on nb-layout also has no effect.
Most helpful comment
Hi @zhengmh010, try setting withScroll=''false" for
nb-layoutas per documentation (https://akveo.github.io/nebular/#/docs/components/layout) to move the scrollbars back to window so that you can listen to that events.