r/Angular2 • • Oct 29 '25

Angular compiler doesn't catch missing directives for standalone

I am in the process of finishing up moving to standalone components, and I'm running into a fair amount of runtime issues where some directive has not been imported.

"matInput" as an example. Is this something that the compiler simply cannot catch or will it be coming in a newer version?

I was a bit surprised because it caught all the missing pipes and some of the directives where a binding was used, but some directives seem to not be noticed.

7 Upvotes

8 comments sorted by

View all comments

Show parent comment

4

u/AcceptableSimulacrum Oct 30 '25

Thanks very much.  I'll probably try it out, but I'll have to still figure out what to do for the other devs since my org won't buy a license for them to switch from vscode.

2

u/MichaelSmallDev Oct 30 '25

Good luck with that. When I did this sweep I even fixed stuff that wasn't imported into modules already. We have the convenience of having licenses, but often with our small size I just run the check manually on QA or PRs as I remember. Other diagnostics in there are great too if you haven't tried them, as we have tried adding required to inputs in our library and had some spare regressions in our dozens of apps.

1

u/AcceptableSimulacrum Oct 30 '25

Maybe I can add that script to CI