mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit improves the error message for using `imports` on a component that isn't set to `standalone: true`. Two concrete improvements are made: * A related information message is added to the diagnostic which suggests the fix of adding `standalone: true`. * The component is marked as poisoned, preventing other errors which might be caused by an incorrectly configured template scope from being generated and thus masking the original problem. Fixes #45850 PR Close #45851 |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| index.ts | ||
| README.md | ||
What is the 'annotations/component' package?
This package implements the ComponentDecoratorHandler, which processes and compiles @Component-decorated classes.
Component compilation is complex, and so not only is this package split out from the parent 'annotations' package, but its functionality is divided into separate files. In Angular, the concept of a component is an extension of a directive, so much of the component compilation functionality is shared with directive compilation, and is imported from the 'annotations/directive' package.