Creating the landing page
The project is set up, and it's time to get on with developing the components and services. Every application should have a landing page that serves as the entry point for your app. If you recall the application design, we will be using the HomeComponent
module to define the home page.
Generating the HomeComponent
The Angular CLI supports the generation of all types of Angular artifacts. To generate the home component, use the following command:
ng generate component home
The preceding command will create a home
folder and generate the component files in it. Since every component should be part of a module, the CLI will also update the AppModule
.
Note
While generating the Angular objects, another handy option is to use the –d
addition, like this: ng generate component –d
The CLI will then show the list of objects to be generated or updated without actually creating or updating them. ...