Back to technologies

/angular

Angular CLI command reference

Common Angular CLI commands for modern frontend development.

13 matches

Project Setup

5 commands

ng new my-app

Create a new Angular application.

ng serve

Start the Angular development server.

ng build

Build the project for development.

ng build --configuration production

Build an optimized production bundle.

ng test

Run the unit test suite.

Code Generation

4 commands

ng generate component users/list

Generate a new component in a feature folder.

ng generate service api/user

Create a reusable Angular service.

ng generate module admin --routing

Generate a feature module with its routing config.

ng generate guard auth

Scaffold a route guard.

Tooling & Maintenance

4 commands

ng add @angular/material

Add Angular Material to a project.

ng update @angular/core @angular/cli

Upgrade Angular and the CLI to the latest version.

ng lint

Run lint checks for the project.

ng version

Show Angular CLI and framework versions.