This project was generated with Angular CLI version 14.2.6.
This Mockup Application consumes data from the TMDB API, allows you to list trends, perform searches and maintain a list of favorites. A TMDB API key is required.
Modify environments/environment.ts or environments/environment.prod.ts to include TMDB API Key.
export const environment = {
production: false,
api_key : 'YOUR API KEY'
};
Components
- Core/Header -> Title.
- Core/Nav -> Section navigation and search.
- Core/CardWall -> List of cards.
- Shared/Card -> Movie card with Image, title, year and favorite button.
- Core/Error -> 404 Error page.
- Core/Footer -> Credits.
Routing
- home -> Shows a list of movies with TMDB's discovery API data.
- fav -> Shows a list of movies added to favorites.
- search/:searchterm -> Shows search results for the search term.
- * -> shows a not found error page.
Data
Both section search, favorites and home rely on cardWall component. They differ in the way they obtain the data.
Search
and Home
use tmdb.service to obtain data from TMDB API to populate the card components. While Favorites
section uses favorite.service.
To store favorites the app makes use of localStorage. The logic for determining what service to use is stored on cardwall component.
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 build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.