In my Angular 8 application, there are buttons that are meant to take the user back to the previous page when clicked. While the functionality works as expected, I am facing an issue where the page does not automatically scroll to the top upon navigating back. Is there a way to modify or add something to achieve this?
import { Location } from '@angular/common';
...
private _location: Location
...
public goBack(): void {
this._location.back();
}