@HostListener("window:scroll", []) is working fine with angular but when we are using with material it not works because <mat-drawer-container fullscreen> tag it will virtually take browser height and scroll within it.
i mean actual windows is not scrolling. so hares the problem comes.
then my question is how to fire event when <mat-drawer-content></mat-drawer-content> scroll instead of window scroll
Add a comment
|
1 Answer
mat-drawer-content has the method elementScrolled(), which returns an Observable of type Event. Check the API ref https://material.angular.io/components/sidenav/api
2 Comments
shiv pandey
Thanks :) and we also do from cdk ways :)