I'm trying to hide a div when user scroll the page, and when stop scroll I want to show the div.
I'm using @HostListener but it fired only user scroll the page.
@HostListener('window:scroll', ['$event'])
onScroll(event) {
this.scroll = true;
setTimeout(() => {
this.scroll = false;
}, 2000);
}