InitialNavigation

From Get docs
< @angular/routerAngular/docs/9/api/router/initialnavigation


InitialNavigation

type-alias

Allowed values in an ExtraOptions object that configure when the router performs the initial navigation operation.

See more...

type InitialNavigation = true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';

See also

  • forRoot()

Description

  • 'enabled' - The initial navigation starts before the root component is created. The bootstrap is blocked until the initial navigation is complete. This value is required for server-side rendering to work.
  • 'disabled' - The initial navigation is not performed. The location listener is set up before the root component gets created. Use if there is a reason to have more control over when the router starts its initial navigation due to some complex initialization logic.
  • 'legacy_enabled'- (Default, for compatibility.) The initial navigation starts after the root component has been created. The bootstrap is not blocked until the initial navigation is complete. @deprecated
  • 'legacy_disabled'- The initial navigation is not performed. The location listener is set up after the root component gets created. @deprecated since v4
  • true - same as 'legacy_enabled'. @deprecated since v4
  • false - same as 'legacy_disabled'. @deprecated since v4

The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.


© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v9.angular.io/api/router/InitialNavigation