Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Say hello to Angular's future home!Check out Angular.devHome
/

withDisabledInitialNavigation

Disables initial navigation.

See more...

      
      withDisabledInitialNavigation(): DisabledInitialNavigationFeature
    
Parameters

There are no parameters.

Returns

DisabledInitialNavigationFeature: A set of providers for use with provideRouter.

See also

Description

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

Further information is available in the Usage Notes...

Usage notes

Basic example of how you can disable initial navigation:

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