diff --git a/packages/core/src/util/ng_dev_mode.ts b/packages/core/src/util/ng_dev_mode.ts index 3b5c9308be..10bc750635 100644 --- a/packages/core/src/util/ng_dev_mode.ts +++ b/packages/core/src/util/ng_dev_mode.ts @@ -82,7 +82,10 @@ export function ngDevModeResetPerfCounters(): NgDevModePerfCounters { * The idea is that unless we are doing production build where we explicitly * set `ngDevMode == false` we should be helping the developer by providing * as much early warning and errors as possible. + * + * NOTE: changes to the `ngDevMode` name must be synced with the CLI and + * possibly other third party tooling. Check with them before altering it. */ -if (typeof global['ngDevMode'] === 'undefined' || global['ngDevMode']) { +if (typeof ngDevMode === 'undefined' || ngDevMode) { ngDevModeResetPerfCounters(); } diff --git a/packages/core/src/util/ng_i18n_closure_mode.ts b/packages/core/src/util/ng_i18n_closure_mode.ts index 7ee5abc919..752e4f24bf 100644 --- a/packages/core/src/util/ng_i18n_closure_mode.ts +++ b/packages/core/src/util/ng_i18n_closure_mode.ts @@ -12,7 +12,11 @@ declare global { const ngI18nClosureMode: boolean; } -if (typeof global['ngI18nClosureMode'] === 'undefined') { +/** + * NOTE: changes to the `ngI18nClosureMode` name must be synced with the CLI and + * possibly other third party tooling. Check with them before altering it. + */ +if (typeof ngI18nClosureMode === 'undefined') { // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure. global['ngI18nClosureMode'] = // TODO(FW-1250): validate that this actually, you know, works.