![]() |
VOOZH | about |
declarations: Array<Type | any[]>
Difference between entry Component and Declaration:
| entry Component | Declarations |
|---|---|
| entryComponent array ensures that tree-shaking doesn't break the application. | Declarations array ensures module encapsulation. |
| entryComponents are used to register components for offline computation in a module. These components are referenced here as they not referenced anywhere else in HTML template. | Declarations are used to make Directives(components, pipes etc.) in a specific module. |
| Components used for router configuration can be added implicitly. | Directives, components, and pipes are matched against the HTML only if they are declared or imported. |
| Array of components are added by ComponentFactoryReolver. | Array of components can be found in HTML template. |