This project is a shopping cart application built with Angular.
This section guides you through setting up and running the project locally.
Node.js and npm (or yarn) installed on your system. You can check their installation by running node -v and npm -v (or yarn -v) in your terminal. Installation
Bash
git clone https://your-github-repo-url.git
Bash
cd ShoppingCart
Bash
npm install (or yarn install)
Bash
ng serve
This will launch the application in your web browser at http://localhost:4200/.
Any changes you make to the code will be automatically reflected in the browser without a full refresh.
The Angular CLI provides commands to generate different project components quickly. Use the following commands in your terminal:
ng generate component component-name
- Creates a new component.
You can similarly generate directives, pipes, services, and other Angular building blocks using ng generate.
Building for Production
To create an optimized production build of your application, run:
Bash
ng build --prod
This will generate production-ready application files in the dist directory.
Bash
ng test
This command executes unit tests using Karma, a popular test runner.
Bash
ng e2e
This command runs end-to-end tests using Protractor, a tool for testing Angular applications in a real browser.
For more details on the Angular CLI and its functionalities, you can use:
Bash
ng help
You can also refer to the official Angular CLI documentation: https://github.com/angular/angular-cli/blob/main/README.md