Example app is only for basic overview - accessible only on https://lassalek.github.io/basic-angular-app/
Test user: "email": "[email protected]", "password": "cityslicka"
Angular version 14.0.2. Additionally - Angular Material, lodash
- tests were completely omitted in this example
- further compotentarization (tiles, tile list, toolbar) was not done since the future component structure could not be sufficiently estimated.
- Color are not done via variables
The application will consist of the following parts:
- Login page + possibility to logout
- Users List page
- User Details page
- Not found page
External API The application will communicate with the external API, Reqres.in. Documentation for the API can be found here: https://reqres.in/. Routes used:
- Authentication: https://reqres.in/api/login
- Users List: https://reqres.in/api/users?page=1&per_page=5
- Single user details: https://reqres.in/api/users/2
- Email field + password field + Submit/Login button
- Both fields are required.
- Email format validation can be done with HTML5 features.
- Display some error message in case of invalid credentials.
- After the success authentication redirect the user to the users list page.
- The user should be able to logout from the application from any page of the application.
- There is no need to call any API for the logout, just clean up your storage and redirect to the login page.
- Display users list as a list of tiles. Each tile should display: avatar, first name, last name, email.
- [] The view of the tile should be responsive (optimized for the desktop/tablet/mobile view).
- User’s name should be a link to the details page.
- Implement a continuous scroll strategy for the users list pagination.
- Use user id in the page URL, e.g /users/.
- Redirect the user to the 404 page if the user does not exist.
- Send authentication token (the token received after the succeeded authentication) in the header of each HTTP request with a key x-access-token.
- Ignore the response support field at the DTO layer of your application.
- Use delay=3 request parameter to simulate delayed response from the 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.
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.