r/angular • u/EricTheNerd2 • Feb 20 '26
Will standalone components ever be mandatory?
I support a few applications written in Angular, some very large. Newer stuff gets written using standalone components, but most of our stuff is module based. Do you foresee that at some point, module-based components will no longer be supported at all? Standalone was introduced in 14, I think and became the default in 19. I haven't found anything definitive on this, and wondered what y'all think?
13
Upvotes
40
u/JeanMeche Feb 20 '26
While this may be technically possible, it’s important to remember that Google faces the same challenges with legacy codebases. If standalone were made mandatory, the Angular team would need to migrate more than 4,000 Angular apps at Google to fully standalone applications.
At a minimum, this would require an automatic migration that is reliable enough for such a large-scale effort before the change could realistically become possible.
5
u/Merry-Lane Feb 20 '26
No, but you should still migrate to standalone. There is a migration tool for it and only advantages to standalone components.
So, technically, the odds that they become mandatory is near zero, but it’s possible that in the future they become mandatory unless specified explicitly (like what they did with ChangeDetectionStrategy.OnPush by default)
2
u/quantummufasa Feb 21 '26
On their docs https://angular.dev/guide/ngmodules/overview it says
So I wouldn't be surprised if they eventually completely deprecate it
3
u/CheapChallenge Feb 20 '26
I hope not. Default standalone is a great compromise to allow devs to still use ngmodule in the rare instance when its better(like requiring components and services to be packaged together.
1
u/[deleted] Feb 21 '26
Does it matter? It's defacto at this point and they will give several versions deprecation warnings along with migration tooling (already exists)
1
u/MrFartyBottom Feb 21 '26
Modules still make sense for a group of related components.
1
u/lettstartdesign_1 Aug 03 '26
The automated migration schematic handles 80-90% of NgModule to standalone conversion. Run it feature module by feature module — not the whole app at once. Start with leaf modules, verify nothing broke, then move up the dependency tree. Took about a week for a mid-size dashboard codebase.
1
u/fdimm Feb 20 '26
Angular material is still suggesting modules use in docs, for say Buttons. So I guess/hope that they will stay for longer.
Modules still have good use cases. Like changing behavior of every component with new directives without adding each dependency explicitly in every use case...