Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
How to detect if page is scrollable in Angular

I am new to Angular and I made an app using angular material stepper that has some steps and some steps have longer content and so the page becomes scrollable. So I am looking for a way to detect if a page or its content is bigger than screen height so I could show a "Scroll Down" image or animation. If it is not scrollable, I don't want to show that animation.

I know that on the right a scroll bar appears, but I want to add this anyway. How do I approach resolving this issue?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can compare the document scroll height vs the window height.

setInterval(function() {
  console.log(x = document.documentElement.clientHeight);
  console.log(y = document.body.scrollHeight);
  console.log("document has scroll: ", y > x)
}, 1000)
<div style="height: 600px">
 a div... go to full page and scroll will be gone
</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!