Prevent scroll to top on single router.navigate call in Angular

Discussão em 'Angular' iniciado por Arrel, Outubro 22, 2024.

  1. Arrel

    Arrel Guest

    My Angular 8 app scrolls to top on navigating to new pages. On one specific page I have a sortable table. When navigating to that page it should scroll to top, but when a table header cell is clicked it should update the query params with the sort but not scroll to top.

    Is it possible to call router.navigate(...) with the new query param data without triggering a scroll to top, while not disabling scroll to top from the route itself?

    Continue reading...

Compartilhe esta Página