angular/packages/compiler-cli/src/ngtsc/annotations/component
Alex Rickabaugh 8ba4ddcb69 refactor(compiler-cli): improve error for imports in non-standalone cmp (#45851)
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
2022-05-03 11:04:09 -07:00
..
src refactor(compiler-cli): improve error for imports in non-standalone cmp (#45851) 2022-05-03 11:04:09 -07:00
test feat(compiler-cli): exclude abstract classes from strictInjectionParameters requirement (#44615) 2022-05-03 10:39:56 -07:00
BUILD.bazel refactor(compiler-cli): split the 'annotations' package into sub-packages (#44812) 2022-02-03 08:55:25 -08:00
index.ts refactor(compiler-cli): split the 'annotations' package into sub-packages (#44812) 2022-02-03 08:55:25 -08:00
README.md refactor(compiler-cli): split the 'annotations' package into sub-packages (#44812) 2022-02-03 08:55:25 -08:00

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.