Angular Modules
Starting with the basic building blocks of Angular, in this lesson, we will see what Angular modules are and how they contribute to making development in Angular easier and modular.
With the development setup ready, we are now ready to learn about all the basic building blocks that make up an Angular application, these include components, modules, services, and pipes, etc.
The first important step in this process is to understand what Angular Modules are.
Frequently asked questions
These are some frequently asked questions by most beginners.
Q. Are Angular modules a kind of container?
Q. Are Angular modules the same as JavaScript modules?
Q. Is an Angular module a block of code with some business logic?
This lesson will cover these questions.
Angular modules
Angular modules are a key part of any Angular application.
If you look at the image above, you will understand how your application structure would look like when you leverage modules in Angular.
It makes the application more logical and structured with all your functionality defined module wise.
You can think of a module as a class that is decorated with @NgModule
. This helps us organize the various pieces inside our application and interact with third-party libraries by integrating them.
It also allows us to import and export the sub pieces to other modules.
The @NgModule
decorator holds the metadata for the ...