Skip to content

docs(cdk/scrolling): explain how to react to scroll events - #33997

Open
mitulkheni wants to merge 1 commit into
angular:mainfrom
mitulkheni:docs/cdk-scrollable-events
Open

mitulkheni wants to merge 1 commit into
angular:mainfrom
mitulkheni:docs/cdk-scrollable-events

Conversation

@mitulkheni

@mitulkheni mitulkheni commented Oct 22, 2026 •

Copy link
Copy Markdown

Adds a section to the scrolling overview that shows how to listen to scroll events with cdkScrollable and the ScrollDispatcher, along with a live example.

Fixes #9594
The scrolling overview only had two short paragraphs about cdkScrollable and ScrollDispatcher and didn't show how to actually listen to scroll events. This adds:

  • a section on elementScrolled, scrolled and ancestorScrolled, with a snippet
  • a live example (cdk-scrollable-overview) that shows the scroll offset and scrolls back to the top
  • a note that the events fire outside the Angular zone, so the view only updates if you use signals or markForCheck

Adds a section to the scrolling overview that shows how to listen to scroll events
with `cdkScrollable` and the `ScrollDispatcher`, along with a live example.

Fixes angular#9594
@angular-robot angular-robot Bot added area: docs Related to the documentation area: cdk/scrolling labels Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cdk/scrolling area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CdkScrollable] Add more documentation and demo examples

1 participant