DEV Community

Faisal Ahmed
Faisal Ahmed

Posted on

in product details page, go to the top position on the details page

_base.scss

html {
  scroll-behavior: smooth;
}
Enter fullscreen mode Exit fullscreen mode

Image description

app-routing.module.ts

@NgModule({
  imports: [RouterModule.forRoot(routes, {
    scrollPositionRestoration: 'enabled',
    anchorScrolling: 'enabled',
    preloadingStrategy: CustomPreloadingStrategy
  })],
  exports: [RouterModule],
  providers: [UserAuthGuard, UserAuthStateGuard]
})
export class AppRoutingModule {
}
Enter fullscreen mode Exit fullscreen mode

Image description

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series πŸ“Ί

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series πŸ‘€

Watch the Youtube series

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay