Is there any good way to scroll to top on every route change in angular 9 without writing any custom javascript code.
You can add configuration for scroll to top when ever route is change using property scrollPositionRestoration: 'enabled'
scrollPositionRestoration: 'enabled'
@NgModule({ imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: 'enabled' } )], exports: [RouterModule] })