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

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

withDisabledInitialNavigation

function
stable

Disables initial navigation.

provideRouter

On this page

    arrow_upward_alt Back to the top

    API

    @returnsDisabledInitialNavigationFeature

    A set of providers for use with provideRouter.

    Description

    Disables initial navigation.

    Use if there is a reason to have more control over when the router starts its initial navigation due to some complex initialization logic.

    Usage Notes

    Basic example of how you can disable initial navigation:

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

    Web Proxy Viewer  |  New URL  |  Original Page