Angular Interview Test 2025 – 400 Free Practice Questions to Pass the Exam

Image Description

Question: 1 / 400

Which command is used to install Angular CLI?

npm install angular-cli

npm install -g @angular/cli

The correct command to install Angular CLI is `npm install -g @angular/cli`. This command uses npm (Node Package Manager) to globally install the Angular Command Line Interface (CLI), which is essential for Angular development.

The `-g` flag stands for "global," indicating that the Angular CLI will be available for use anywhere on your system, rather than being limited to a specific project. This is important because developers often need to initiate new Angular projects and use various Angular CLI commands across different directories.

The package name `@angular/cli` is the correct identifier for the Angular CLI in the npm registry. The `@angular` prefix signifies that it belongs to the Angular framework, and `cli` represents the command line interface component of it. Therefore, using this command allows developers to quickly set up Angular projects and utilize various features of Angular.

Other options do not provide the appropriate format or context needed for installing the CLI. For example, simply using `npm install angular-cli` refers to an outdated version of the CLI, while commands that miss the npm context or the `@angular/cli` specification would not successfully install the correct package or might lead to installation errors.

Get further explanation with Examzify DeepDiveBeta

install -g @angular/cli

ng install @angular/cli

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy