When working on complex applications, you often end up with a lot of feature modules. To minimize the number of these modules, Angular lets you put all the common modules and directives together in a shared module. Shared modules can help you write more organized code in less time, helping you be more productive. Shared modules are an ideal spot to declare components in order to make them reusable. You won’t have to re-import the same components in every module—you’ll just import the shared module.
In this guide, you will learn how to use shared modules to organize your code more effectively. This guide will build on another Pluralsight guide that covered how to implement lazy loading with preloading in an application, using the same example to explain how to use shared modules.
Shared modules play an essential role in lazy loading, where you have a lot of modules and need to be productive. It comes down to smart work instead of hard work and impacts bundle size and performance as well. If you need another resource to learn more about this topic, check this out.