Creating UI Modules and Components
One of the great things about working with Angular is that it promotes building your applications in a modular and componentized way.
In Angular, an NgModule (or simply Module) is a way to group your application into logical blocks of functionality.
A Module is a TypeScript class with the @NgModule decorator. In the decorator, we define how Angular compiles and runs the code inside the module.
In this lesson, we are going to build a module that groups together all the components we want to use in our user interface.
We will add a LayoutComponent that consists of our HeaderComponent and FooterComponent, and in-between those, we will define the space where our application code will be displayed using the RouterOutlet ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access