Using the Angular CLI, generate a new component named heroes
.
generate component heroes
The CLI creates a new folder, src/app/heroes/
, and generates the three files of the HeroesComponent
along with a test file.
The HeroesComponent
class file is as follows: