Skip to content

Instantly share code, notes, and snippets.

@azaharafernandezguizan
Created September 19, 2019 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azaharafernandezguizan/376e83bbdc06fc16634799869764fcdc to your computer and use it in GitHub Desktop.
Save azaharafernandezguizan/376e83bbdc06fc16634799869764fcdc to your computer and use it in GitHub Desktop.
Routing module with anchor scrolling
@NgModule({
imports: [
RouterModule.forRoot(routes, {
onSameUrlNavigation: "ignore",
anchorScrolling:'enabled',
scrollPositionRestoration: 'enabled'
})
],
exports: [RouterModule]
})
export class AppRoutingModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment