Skip to content

Concepts overview

ngx-magic-scroll connects stable content IDs to the route fragment and the position of a scroll container. Regions define eligible targets, URL state identifies the section, data readiness determines when initial restoration can run, and position preservation handles later changes.

Read the concepts in order for the full model, or choose the topic relevant to your application.

Scroll regions and anchor identity

Which elements belong to a region, and which container actually scrolls?

Understand stable IDs, anchor selection and ownership in nested regions.

Explore regions and anchors

URL state and navigation

How do the fragment, scroll spy and explicit navigation work together?

Understand what the active anchor represents, how history entries are updated and when navigation causes scrolling.

Explore URL state and navigation

Data readiness and restoration

When can a linked section be restored?

Follow the initial restoration sequence and learn what your application must load and render before declaring readiness.

Explore readiness and restoration

Position preservation and layout changes

What happens when data or layout changes after restoration?

Understand the current anchor, automatic corrections and the offset shared by scrolling and sticky companion panels.

Explore position preservation

For your first working region, start with Getting started. For complete implementation examples, use the Recipes; for signatures and configuration details, consult the API reference.