Spec-Zone.ru › Angular

withInMemoryScrolling

Enables customizable scrolling behavior for router navigations.

provideRouterViewportScroller

API

function withInMemoryScrolling(
  options?: InMemoryScrollingOptions,
): InMemoryScrollingFeature;
@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())
    ]
  }
);

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/router/withInMemoryScrolling

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API