DEV Community

abdulhannan755
abdulhannan755

Posted on

ANGULAR GETTING BACK TO ORIGINAL POSITION

when clicking the back button it get back to top position of page soo how we can get back to original position where clicked

Top comments (2)

Collapse
 
nicowernli profile image
Nicolás Wernli

In Angular 17 you have to add the config to the router provider

provideRouter(
routes,
withInMemoryScrolling({
scrollPositionRestoration: 'enabled',
anchorScrolling: 'enabled',
})
),

Collapse
 
gaurangdhorda profile image
GaurangDhorda

Hi, please connect with me by email grdtechlab@gmail.com and we will discuss to the same. Looking forward to hearing from you. Thanks!