Skip to content

LassaLek/basic-angular-app

Repository files navigation

BasicAngularApp description

Example app

Example app is only for basic overview - accessible only on https://lassalek.github.io/basic-angular-app/

Test user: "email": "[email protected]", "password": "cityslicka"

Information

Angular version 14.0.2. Additionally - Angular Material, lodash

Debts:

  • 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

Requirements

The application will consist of the following parts:

  1. Login page + possibility to logout
  2. Users List page
  3. User Details page
  4. 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:

Login Page

  • 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.

Logout

  • 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.

Users List

  • 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.

User Details

  • Use user id in the page URL, e.g /users/.
  • Redirect the user to the 404 page if the user does not exist.

Other

  • 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

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.

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published