Skip to content

About

This will be used for simple assessments and sample projects.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Assessments

This will be used for simple assessments and sample projects.

Frontend (Angular)

The frontend is almost complete, with just one missing function. Your task is to implement the "Add to Cart" functionality on the product details page (product-details.component.ts). When the "Add to Cart" button is clicked, the selected product should be added to the cart array.

Also you should build a simple "Show My Cart" page to display the items in your cart similar to the list of products.

Backend (Node.js)

The backend is partially completed. You need to implement the following API endpoints:

GET /api/getProducts: Retrieve a list of mocked products. GET /api/products/:id: Retrieve details of a specific product based on the provided ID. GET /api/getCart: Retrieve a list of items in the cart. GET /api/addToCart/:id: Add item to the cart and get a count of items.

Mocked Data

The backend provides mocked data for products. The data is stored in backend/data/products.js.

Your Task

Implement the missing "Add to Cart" functionality and "Show My Cart" in the frontend. Implement the backend API endpoints as specified above.

Submission

Please create a zip archive of your completed project (including the code and updated README) and send it to us.

About

This will be used for simple assessments and sample projects.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages