mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Previously, when navigating to a new page via a link, the scroll position was correctly restored to 0, but navigating to a new page via typing the URL in the browser address bar keeps the old scroll position. This commit ensures that the scroll position is restored to 0 whenever the `ScrollService` is instantiated anew (i.e. new page navigation). The old behavior of retaining the scroll position on reload is kept by storing the old URL when leaving a page and only applying the stored scroll position if the new URL matches the stored one. Fixes #33260 PR Close #33344 |
||
|---|---|---|
| .. | ||
| custom-elements | ||
| documents | ||
| layout | ||
| navigation | ||
| search | ||
| shared | ||
| sw-updates | ||
| app.component.html | ||
| app.component.spec.ts | ||
| app.component.ts | ||
| app.module.ts | ||