From cc904b5226b1f3ac7fa1b5558afe7bb99324c17a Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Sun, 23 May 2021 11:59:55 +0100 Subject: [PATCH] docs(core): clarify deprecation of `entryComponents` (#42248) These may still be needed in View Engine libraries. Closes #39958 PR Close #42248 --- aio/content/guide/deprecations.md | 6 +++++- packages/core/src/metadata/ng_module.ts | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 3bba0a4f0b..61bc0a975c 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -380,7 +380,11 @@ All of the `wtf*` APIs are deprecated and will be removed in a future version. {@a entryComponents} ### `entryComponents` and `ANALYZE_FOR_ENTRY_COMPONENTS` no longer required -Previously, the `entryComponents` array in the `NgModule` definition was used to tell the compiler which components would be created and inserted dynamically. With Ivy, this isn't a requirement anymore and the `entryComponents` array can be removed from existing module declarations. The same applies to the `ANALYZE_FOR_ENTRY_COMPONENTS` injection token. +Previously, the `entryComponents` array in the `NgModule` definition was used to tell the compiler which components would be created and inserted dynamically. +With Ivy, this isn't a requirement anymore and the `entryComponents` array can be removed from existing module declarations. +The same applies to the `ANALYZE_FOR_ENTRY_COMPONENTS` injection token. + +Note: You may still need to keep these if building a library that will be consumed by a View Engine application. {@a moduleWithProviders} ### `ModuleWithProviders` type without a generic diff --git a/packages/core/src/metadata/ng_module.ts b/packages/core/src/metadata/ng_module.ts index f23f0dc29c..acbd2000d3 100644 --- a/packages/core/src/metadata/ng_module.ts +++ b/packages/core/src/metadata/ng_module.ts @@ -199,7 +199,10 @@ export interface NgModule { * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`. * * @see [Entry Components](guide/entry-components) - * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary. + * @deprecated + * Since 9.0.0. With Ivy, this property is no longer necessary. + * (You may need to keep these if building a library that will be consumed by a View Engine + * application.) */ entryComponents?: Array|any[]>;