Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const elmRef = document.querySelector('.faq-overlay .mat-dialog-container') || document.body;
- fromEvent(elmRef, 'scroll')
- .pipe(
- takeUntil(this.unsubscribe),
- debounceTime(200)
- )
- .subscribe(() => {
- this.isScrollButtonVisible = elmRef.scrollTop > 100;
- this.cdRef.detectChanges();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement