Skip to content

Commit

Permalink
docs: correct default for router extra option (#32702)
Browse files Browse the repository at this point in the history
PR Close #32702
  • Loading branch information
jbogarthyde authored and AndrewKushnir committed Sep 23, 2019
1 parent af99f9e commit e63390d
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions packages/router/src/router_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,17 @@ export function provideRoutes(routes: Routes): any {
* Allowed values in an `ExtraOptions` object that configure
* when the router performs the initial navigation operation.
*
* * 'enabled' (Default) The initial navigation starts before the root component is created.
* The bootstrap is blocked until the initial navigation is complete.
* * '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](guide/universal) 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'- The initial navigation starts after the root component has been created.
* * '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
* 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
*
Expand Down Expand Up @@ -275,11 +276,24 @@ export interface ExtraOptions {
useHash?: boolean;

/**
* One of `enabled` (the default) or `disabled`.
* By default, the initial navigation starts before the root component is created.
* The bootstrap is blocked until the initial navigation is complete.
* One of `enabled` or `disabled`.
* When set to `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](guide/universal) to work.
* When set to `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 values are deprecated since v4 and should not be used for new applications:
*
* * `legacy_enabled` - Default for compatibility.
* The initial navigation starts after the root component has been created,
* but the bootstrap is not blocked until the initial navigation is complete.
* * `legacy_disabled` - The initial navigation is not performed.
* The location listener is set up after the root component gets created.
* * `true` - same as `legacy_enabled`.
* * `false` - same as `legacy_disabled`.
*/
initialNavigation?: InitialNavigation;

Expand Down

0 comments on commit e63390d

Please sign in to comment.