#How long NgModule will be supported in Angular?

17 messages · Page 1 of 1 (latest)

sullen forge
#

From Angular 19, standalone is set up as default. how long NgModule will be supported by Angular team? will it be removed soon or is there any plan?

unborn arrow
#

I doubt it's removed any time soon. Forms still very much depend on it, as well as testing.
But don't use that as an excuse to keep having them in your own application code. Migrate to standalone. there's even a migration that does it for you.

sullen forge
#

Yes, I got the Angular Cli to migrate it to standalone, but I want to keep NgModule yet due to it's large projects and I'm not a hug fan of standalone, 🙂

unborn arrow
#

The larger your project is, the more you'll benefit from standaone IMHO. It makes lazy-loading and reusability much easier.

blissful rune
#

NgModules will be deprecated eventually but there is no plan for it now.

faint thunder
blissful rune
#

It's an illusion that NgModule structure your project.

#

They don't really enforce boundaries and only really existed for technical reasons of internal scoping.

faint thunder
#

Okay thanks. Pls what internal benefits standalone brings into the picture.

blissful rune
#

Some feature like deferrable views, require standalone components

#

also explicit dependencies is a big win in terms of maintenability

keen briar
#

Modules on its own aren't bad, the problem was a lot how we used them. Every project has a giant "SharedModule", and it's imported everywhere, even if you don't need 99% of the things

faint thunder
#

Yeah you could opt for using standalone for the SharedModule.

meager steeple
faint thunder
#

Was about asked for that. still having issue coming up good project structure for standardalone comps#

blissful rune
#

The same than with modules

#

but without the Module