4. Setting up the Development Environment
To build Angular applications, we need Node.js, npm (Node Package Manager), and the Angular Command Line Interface (CLI).
1. Install Node.js and NPM
Angular requires a recent, active LTS (Long Term Support) version of Node.js. Node.js bundles npm.
- Download and install Node.js from the official website.
- Verify the installation in your terminal: bash node -v npm -v
2. Install the Angular CLI
The Angular CLI is a command-line tool that helps you scaffold, develop, and maintain Angular applications. It handles configuration, build processes, and generating boilerplate code.
Install the CLI globally using npm:
bash npm install -g @angular/cli
3. Verify Angular CLI Installation
Check the version to confirm successful installation:
bash ng version
4. Setting up a Code Editor
While any editor works, Visual Studio Code (VS Code) is highly recommended due to its excellent TypeScript support and integration with Angular tools.
Recommended VS Code Extensions:
- Angular Language Service
- Prettier (for code formatting)
Once Node, NPM, and the Angular CLI are set up, you are ready to create your first project.