Document NG0303 diagnostic when an unknown binding is present in a template #59488
Labels
area: docs
Related to the documentation
Milestone
10000
Which @angular/* package(s) are relevant/related to the feature request?
compiler
Description
Hi !
Doing large scale 'legacy' migration through SAC / CF I came over this potential optimization that might help us improve the DX slightly. Currently if a component template has
NgTemplateOutlet
while the respectivecomponent.imports
array is missing the import of the directive, the app compiles successfully and the app might have a leaking issue that might only be caught during QA testing at runtime (supposing the respective existing component does not have properly test). I would rather expect the app to compile-time fail as it does when the aforementioned template is using something likeNgClass
while the respective import is missing, as this will yieldNG8002
in case of missingNgClass
import.Repo: https://github.com/bougwal/NG0303
Proposed solution
I am thus, asking for:
NG0303
compile time failure if there are no blockers/concerns.NG0303
to the error encyclopaedia, as I don't see it logged on ADEV neither under runtime nor under compile time: https://angular.dev/errors. Is there a reason to exclude it?Let me know if I am missing smth I have to add / I look forward to the input / more context on this !
Many thanks guys !
Alternatives considered
n/a
The text was updated successfully, but these errors were encountered: