Bird
0
0

Which npm command installs the Angular CLI package globally on your system?

easy📝 Syntax Q3 of 15
Angular - Fundamentals
Which npm command installs the Angular CLI package globally on your system?
Anpm install @angular/cli
Bnpm install -g @angular/cli
Cnpm update -g @angular/cli
Dnpm uninstall -g @angular/cli
Step-by-Step Solution
Solution:
  1. Step 1: Understand npm install flags

    The -g flag installs packages globally, making commands available system-wide.
  2. Step 2: Identify the correct package

    The Angular CLI package is @angular/cli.
  3. Final Answer:

    npm install -g @angular/cli installs Angular CLI globally, enabling the ng command anywhere.
  4. Quick Check:

    Global install uses -g flag [OK]
Quick Trick: Use 'npm install -g @angular/cli' for global Angular CLI install [OK]
Common Mistakes:
  • Omitting the -g flag installs locally, not globally
  • Using npm update instead of install for first-time install
  • Uninstall command is for removal, not installation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes