Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 2.02 KB

README.md

File metadata and controls

30 lines (19 loc) · 2.02 KB

AnimalProject

This project was generated with Angular CLI version 17.0.5.

Tasks

  • 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 in src/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 created AnimalFactList component display each fact list when toggle state changes. You can use any known method to provide correct fact services for AnimalFactList component however using Strategy design pattern is preferred
  • add unit tests to cover functionalities in selected components/services

Resources

Development server

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.

Code scaffolding

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.

Running unit tests

Run ng test to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.