Saturday 3 October 2020

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

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?



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

No comments:

Post a Comment