Creating a Module
Explore how to use Angular CLI to create multiple modules for different pages, helping you organize your application structure. Understand the benefits of separating components and routing into their own modules for better scalability and maintainability.
We'll cover the following...
Like anything else, modules can be created with the Angular CLI. It’s the preferred and recommended way to create a module. We can run the ng generate module <name> command. The <name> portion can be replaced with the name of the module you’d like to give.
Project overview
The project we will be working on is a simple website. We’ll have a homepage, an about page, and a contact page. This is why we installed the router. We want to be able to switch between pages like a standard website.
If we want to, we can write everything in the AppComponent. However, that defeats the purpose of using ...