'Scroll position save and restore scroll position once back I am on my position in Angular

I am trying this but it's not working. I am implementing management software do and I need this solution

RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled'})

Right now I am on the page in the last position okay once I am clicking and navigating to the second page once I am back on how to be in the last position.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source