Angular 7 scroll event does not fire
问题 For implementing a spy nav bar in my Angular app in a MatDialog component. I implemented a directive to spy for the scroll event using @HostListener('window:scroll', ['$event']) I also tried 'scroll' as event name. But the event does not seem to fire. I tried several approaches, e. g. by using the HostListener directly in the dialog component, by using the JavaScript window.onscroll() function and the rxjs fromEvent() function but without success. Trying other css events (e. g. window:click )