• 개요
@angular/router

withEnabledBlockingInitialNavigation

함수
안정화

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

@returnsEnabledBlockingInitialNavigationFeature

A set of providers for use with provideRouter.

설명

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.

사용 시 참고사항

Basic example of how you can enable this navigation behavior:

const appRoutes: Routes = [];
bootstrapApplication(AppComponent,
  {
    providers: [
      provideRouter(appRoutes, withEnabledBlockingInitialNavigation())
    ]
  }
);
상세 내용으로 이동