← 返回命令列表

Linux command

ng-version 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show Angular versions

ng version

Show version as JSON

ng version --json

说明

ng version displays Angular CLI and package versions, including `@angular/core`, `@angular/cli`, RxJS, TypeScript, Node.js, and the package manager in use. When run outside an Angular workspace it prints only the globally installed CLI information. `v` is accepted as a short alias (`ng v`). The output is useful when reporting bugs, auditing dependency versions, or diagnosing build issues.

参数

--json
Output as JSON.
--help
Display help information.

FAQ

What is the ng-version command used for?

ng version displays Angular CLI and package versions, including `@angular/core`, `@angular/cli`, RxJS, TypeScript, Node.js, and the package manager in use. When run outside an Angular workspace it prints only the globally installed CLI information. `v` is accepted as a short alias (`ng v`). The output is useful when reporting bugs, auditing dependency versions, or diagnosing build issues.

How do I run a basic ng-version example?

Run `ng version` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --json do in ng-version?

Output as JSON.