Subcommands (16)
Add and configure packages for the current workspace project.
Manage Angular CLI analytics settings.
Compile an Angular application or library into an output directory named `dist/`.
Configure the persistent disk cache and retrieve cache statistics.
Generate shell autocompletion scripts for the Angular CLI.
Use JSON path notation (camelCase) to edit workspace or project configurations, such as build options.
Invoke the deploy builder for a project in the workspace. Note: Deployment requires setup via `ng add`.
Build and serve an Angular application, then run end-to-end tests. Note: Available `e2e` packages include Playwright, Cypress, Nightwatch, WebdriverIO, and Puppeteer.
Generate and/or modify files based on a schematic.
Check Angular project code for style and errors using the configured linter. Note: Linting requires setup via `ng add`.
Create and initialize a new Angular application.
Run an Architect target with an optional custom builder configuration.
Build and serve the application, rebuilding on file changes.
Run unit tests in a project. Note: Some commands might require additional packages such as Vitest.
Update an Angular workspace and its dependencies.
Display Angular CLI version.
Options (7)
booleanCreate a new Angular application inside a directory
ng {{[n|new]}} {{project_name}}booleanCompile the application and start a local development server
ng {{[s|serve]}}booleanCreate a new component
ng {{[g|generate]}} {{[c|component]}} {{component_name}}booleanCreate a new component
ng {{[g|generate]}} {{[c|component]}} {{component_name}}booleanBuild an Angular application or library
ng {{[b|build]}}booleanRun unit tests
ng {{[t|test]}}booleanDisplay version
ng {{[v|version]}}Examples (8)
Create a new Angular application inside a directory
ng [n|new] project_nameCompile the application and start a local development server
ng [s|serve]Create a new component
ng [g|generate] [c|component] component_nameBuild an Angular application or library
ng [b|build]Run unit tests
ng [t|test]Add a package to the current project
ng add packageUpdate workspace dependencies
Display version
ng [v|version]