Angular Local Development Guide
Create projects using Angular CLI and start the development server at localhost:4200, supporting components, routing, and dependency injection.
Angular is an enterprise-level TypeScript frontend framework maintained by Google, providing a complete CLI toolchain, component-based architecture, routing, forms, and an HTTP client, making it suitable for large SPAs and backend management systems.
Quick Start
npm install -g @angular/cli
ng new my-app
cd my-app
ng serveOr use a non-global installation:
npx @angular/cli@latest new my-app
cd my-app
npx ng serveDefault localhost Access
| Purpose | Address |
|---|---|
| Development Server | http://localhost:4200 |
To change the port: ng serve --port 4300 or configure serve.options.port in angular.json.
Common Commands
| Command | Description |
|---|---|
ng serve | Start the development server (hot reload) |
ng build | Build to dist/ |
ng test | Run unit tests |
ng generate component foo | Generate component scaffolding |
Integrating with Backend APIs
During development, you can configure a proxy in proxy.conf.json to forward /api to your local backend:
{
"/api": {
"target": "http://localhost:8080",
"secure": false
}
}Start with: ng serve --proxy-config proxy.conf.json.
Summary
The default local development for Angular is http://localhost:4200. With a standardized structure and a mature toolchain, it is suitable for large TypeScript frontend projects and team collaboration.