This project is an implementation of the assignment for Accepted Ltd and was generated with Angular CLI.
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.
(The project structure was inspired by this post.)
-
main
-> Contains the bootstrap process of the application, as long as the initial route, necessary providers and the BACKEND_URL injection token. -
app.component
-> Contains the basic structure of the app, like the header & the router-outlet template and initializes the app theme. -
shell
-> Contains the search and select fields, which handle the data to be displayed in the UI. It also contains an inner router-outlet for the different kinds of data categories, in the shell routes. Thedata-access
folder contains the interface of the selection. -
sports
-> Contains the sports routes & the sports component, whick contains the logic. Theui
folder contains the template of the sports item and thedata-access
folder contains theSport
interface, as long as theresolver
for prefetching the data. -
leagues
-> Contains the leagues routes & the leagues component, whick contains the logic. Theui
folder contains the template of the leagues item and thedata-access
folder contains theLeague
interface, as long as theresolver
for prefetching the data. -
countries
-> Contains the countries routes & the countries component, whick contains the logic. Theui
folder contains the template of the countries item and thedata-access
folder contains theCountry
interface, as long as theresolver
for prefetching the data. -
shared
-> Contains theheader
component, which implements the theme toggle funcionality, thedetail-dialog
component, which implements the detail view of thesport-item
in a Material Dialog and thedata-access
folder, which contains thesports-db
service, which implements the API data handling and thetheme
service, which handles the light/dark theme.