docs(core): clarify deprecation of `entryComponents` (#42248)

These may still be needed in View Engine libraries.

Closes #39958

PR Close #42248
This commit is contained in:
Pete Bacon Darwin 2021-05-23 11:59:55 +01:00 committed by Jessica Janiuk
parent b061e5b2d7
commit cc904b5226
2 changed files with 9 additions and 2 deletions

View File

@ -380,7 +380,11 @@ All of the `wtf*` APIs are deprecated and will be removed in a future version.
{@a entryComponents} {@a entryComponents}
### `entryComponents` and `ANALYZE_FOR_ENTRY_COMPONENTS` no longer required ### `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} {@a moduleWithProviders}
### `ModuleWithProviders` type without a generic ### `ModuleWithProviders` type without a generic

View File

@ -199,7 +199,10 @@ export interface NgModule {
* using one of the imperative techniques, such as `ViewContainerRef.createComponent()`. * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.
* *
* @see [Entry Components](guide/entry-components) * @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<Type<any>|any[]>; entryComponents?: Array<Type<any>|any[]>;