From 353368cccd24b888217db8a6ec49a89407893e5e Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Mon, 16 Sep 2019 10:46:50 -0700 Subject: [PATCH] docs: correct default for router extra option (#32702) PR Close #32702 --- packages/router/src/router_module.ts | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/router/src/router_module.ts b/packages/router/src/router_module.ts index d74be09ad9..691a4be524 100644 --- a/packages/router/src/router_module.ts +++ b/packages/router/src/router_module.ts @@ -229,16 +229,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 * @@ -271,11 +272,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;