Angular: extract a module with existing components and important lesson about NgModule
I often see Angular applications with bad architecture, especially no separation on modules. As a result, all components of an application are put in a single app/components
folder which makes it hard to separate concerns. Which components are grouped together? Which components require a service? Which component is merely a part of another component? Are there any dumb components?
In this article, I’ll show how easy it is to refactor an Angular application and extract a new module with existing components. I’ll describe a simple case, with no global services.
…