{ "id": "api/router/InitialNavigation", "title": "InitialNavigation", "contents": "\n\n
\n
\n
\n \n API > @angular/router\n
\n \n
\n \n
\n

InitialNavigationlink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

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

\n\n

See more...

\n
\n \n \n \n
\n \n type InitialNavigation = 'disabled' | 'enabled' | 'enabledBlocking' | 'enabledNonBlocking';\n \n
\n\n \n
\n

See alsolink

\n
    \n \n
  • forRoot()

    \n
  • \n
\n
\n\n\n \n \n
\n

Descriptionlink

\n
    \n
  • 'enabledNonBlocking' - (default) The initial navigation starts after the\nroot component has been created. The bootstrap is not blocked on the completion of the initial\nnavigation.
  • \n
  • 'enabledBlocking' - The initial navigation starts before the root component is created.\nThe bootstrap is blocked until the initial navigation is complete. This value is required\nfor server-side rendering to work.
  • \n
  • 'disabled' - The initial navigation is not performed. The location listener is set up before\nthe root component gets created. Use if there is a reason to have\nmore control over when the router starts its initial navigation due to some complex\ninitialization logic.
  • \n
\n

The following values have been deprecated since v11,\nand should not be used for new applications.

\n
    \n
  • 'enabled' - This option is 1:1 replaceable with enabledBlocking.
  • \n
\n\n \n
\n\n\n \n\n\n
\n
\n\n\n" }