When your application routes back to a previous page, the browser might remember the scroll position it was in. So you might be position at the bottom of the screen, instead of the top.

If you want to make sure to scroll to the top of the page when your application routes back to a previous page, you can set this behavior with the config parameter of RouterModule.forRoot() method.

RouterModule.forRoot(routes, {
  scrollOffset: [0, 0],
  scrollPositionRestoration: 'top',
});