This project was generated with Angular CLI version 17.0.5.
- have a quick overview of the project structure
- get familiar with CatService and DogService services as well as CatFact, CatFactsResponse, DogFact and DogFactsResponse interfaces
- create reusable
AnimalFactList
component insrc/app/components/animal-fact-list
directory AnimalFactList
component should be able to display a list of animal facts coming from different fact services e.g. CatService or DogService- created component should be independent from specific fact services as their number will grow in the future
- in
App
component you will find Button toggle component with cat facts and dog facts options, using createdAnimalFactList
component display each fact list when toggle state changes. You can use any known method to provide correct fact services forAnimalFactList
component however using Strategy design pattern is preferred - add unit tests to cover functionalities in selected components/services
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng test
to execute the unit tests via Karma.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.