Adding heroes functionality
The primary goal of our application is to manage heroes. Thus, we need to create a feature module that groups similar functionality about heroes. The folder structure of the module should be as follows:
The heroes
module contains the following Angular artifacts:
hero
: a component that is used to create a new herohero-detail
: a component that is used to display details of a specific heroheroes.component.ts
: a component that hosts the list of heroes and the sidebar for displaying details of a specific heroheroes.service.ts
: a service that uses the Angular HTTP client to provide CRUD operations for heroes dataImportant Note
We have named the
heroes
host component the same as the module and placed it inside the same folder because it is the landing page of theheroes
module. You can think of it as the main page of the feature. To create a component without a...