Challenge - 5 Problems
Angular CLI Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Angular CLI Installation Command
Which command correctly installs the Angular CLI globally using npm?
Attempts:
2 left
💡 Hint
The global flag is -g.
✗ Incorrect
The correct command to install Angular CLI globally is 'npm install -g @angular/cli'. The -g flag should be placed before the package name. Other options have wrong package names or syntax.
❓ component_behavior
intermediate2:00remaining
Angular CLI New Project Creation
What is the output behavior after running the command 'ng new my-app' in a terminal?
Attempts:
2 left
💡 Hint
Think about what 'ng new' is designed to do.
✗ Incorrect
'ng new my-app' creates a new Angular project folder named 'my-app' with all necessary files and installs dependencies automatically.
📝 Syntax
advanced2:00remaining
Correct Angular CLI Command to Serve Project
Which command correctly starts the Angular development server for the current project?
Attempts:
2 left
💡 Hint
The command to launch the dev server is short and simple.
✗ Incorrect
'ng serve' compiles the project and starts a local development server with live reload. Other commands do not start the server.
🔧 Debug
advanced2:00remaining
Error When Running 'ng' Command
You installed Angular CLI globally but running 'ng version' gives 'command not found'. What is the most likely cause?
Attempts:
2 left
💡 Hint
Check if your system knows where to find global npm commands.
✗ Incorrect
If the global npm bin folder is not in PATH, the shell cannot find 'ng' command even if installed globally.
❓ lifecycle
expert2:00remaining
Angular CLI Version Compatibility
You have Angular CLI version 15 installed globally but your project uses Angular version 13. What is the expected behavior when running 'ng serve' inside the project folder?
Attempts:
2 left
💡 Hint
Angular CLI tries to work with older projects but warns you.
✗ Incorrect
Angular CLI shows a warning about version mismatch but usually still runs commands like 'ng serve'. It does not downgrade or block running.