[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/router/withInMemoryScrolling [Back]  [Original]

withInMemoryScrolling Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/router

withInMemoryScrolling

function
stable

Enables customizable scrolling behavior for router navigations.

provideRouterViewportScroller

On this page

    arrow_upward_alt Back to the top

    API

    @paramoptionsInMemoryScrollingOptions

    Set of configuration parameters to customize scrolling behavior, see InMemoryScrollingOptions for additional information.

    @returnsInMemoryScrollingFeature

    A set of providers for use with provideRouter.

    Usage Notes

    Basic example of how you can enable scrolling feature:

    const appRoutes: Routes = [];
    bootstrapApplication(AppComponent,
      {
        providers: [
          provideRouter(appRoutes, withInMemoryScrolling())
        ]
      }
    );
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page