Spec-Zone.ru › Angular

withEnabledBlockingInitialNavigation

Configures initial navigation to start before the root component is created.

provideRouter

API

function withEnabledBlockingInitialNavigation(): EnabledBlockingInitialNavigationFeature;
@returnsEnabledBlockingInitialNavigationFeature

A set of providers for use with provideRouter.

Description

Configures initial navigation to start before the root component is created.

The bootstrap is blocked until the initial navigation is complete. This should be set in case you use server-side rendering, but do not enable hydration for your application.

Usage Notes

Basic example of how you can enable this navigation behavior:

const appRoutes: Routes = [];
bootstrapApplication(AppComponent,
  {
    providers: [
      provideRouter(appRoutes, withEnabledBlockingInitialNavigation())
    ]
  }
);

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/withEnabledBlockingInitialNavigation

Spec-Zone.ru

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