Potal
This project was generated with Angular CLI version 12.0.2.
Development server
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app 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
.
Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Running unit tests
Run ng test
to execute the unit tests via Karma.
Running end-to-end tests
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.
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.
Front-end OMDb assessment
Search the OMDb API
Archived Content Follows
Task Details
- Consume the OMDb API to fetch the top 10 results matching your search query (JSON).
- Create an interface with at least one input field to be used to search for movies by title.
- Present the results in real time and update the interface as the user types his search query.
- Once the results are displayed allow the user to click on any particular movie to view its details.
- On the movie details view display more information.
OMDb API Examples
OMDb API does not require any form of authentication. See the OMDb API documentation for all supported parameters.
Search by query
http://www.omdbapi.com/?s=ghost //results 1-10
http://www.omdbapi.com/?s=ghost&page=2 // results 11-20
- Returns the first 10 results based on the query value provided as
s
- Pagination can be added via
&page=n
, wheren
is 1-100
Movie Object Structure
{
"Title": "Mission: Impossible - Ghost Protocol",
"Year": "2011",
"imdbID": "tt1229238",
"Type": "movie",
"Poster": "https://images-na.ssl-images-amazon.com/images/M/MV5BMTY4MTUxMjQ5OV5BMl5BanBnXkFtZTcwNTUyMzg5Ng@@._V1_SX300.jpg"
}
imdbID
View movie details by http://www.omdbapi.com/?i=tt1229238
- Using the
imdbID
provided by the search results will let you fetch the details of a particular movie.