3

@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

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks :) and we also do from cdk ways :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.