Before you begin, ensure you have the following installed:
- Node.js (version 18 or higher)
- npm (comes with Node.js)
- Angular CLI (
npm install -g @angular/cli)
-
Clone the repository
-
Install dependencies:
npm install
-
Start the development server:
npm start
The application will be available at
http://localhost:4200
To build the Angular application for production deployment:
npm run buildor
ng build --configuration=productionThis command will:
- Create an optimized build in the
dist/folder - Enable ahead-of-time (AOT) compilation
- Minify CSS and JavaScript files
- Enable tree-shaking to remove unused code
- Apply build optimizations for better performance
The production build generates the following optimized files in dist/:
index.html- The main HTML filemain.[hash].js- Main application bundlepolyfills.[hash].js- Browser compatibility polyfillsstyles.[hash].css- Compiled and minified styles- Static assets from the
src/assets/folder
After building for production:
- Upload the contents of the
dist/folder to your web server - Configure your web server to serve
index.htmlfor all routes (for Angular routing to work) - Ensure your server supports HTTPS for production deployments
src/app/components/- Reusable UI componentssrc/app/pages/- Page components and routingsrc/app/services/- Business logic and API servicessrc/app/interfaces/- TypeScript interfacessrc/app/types/- Type definitionssrc/assets/- Static assets (images, styles)