Prerequisites
Before you begin, ensure your development environment includes the following:Node.js
Angular requires an active LTS or maintenance LTS version of Node.js. Check the specific version requirements:- Minimum version: Node.js 18.x or later
- Recommended: Latest LTS version
npm or pnpm
Angular uses npm (Node Package Manager) or pnpm for dependency management. npm is included with Node.js. Verify your package manager:Install Angular CLI
The Angular CLI is a command-line interface tool that helps you initialize, develop, scaffold, and maintain Angular applications.Install globally
Install the Angular CLI globally using npm:The
-g flag installs the CLI globally, making the ng command available from any directory.Verify installation
After installation, verify that the Angular CLI is installed correctly:System requirements
Operating systems
Angular CLI supports the following operating systems:- Windows: Windows 10 or later
- macOS: macOS 10.13 or later
- Linux: Most modern Linux distributions
Browsers
Angular applications run in modern browsers. The framework supports:- Chrome (latest)
- Firefox (latest)
- Edge (latest)
- Safari (latest)
TypeScript
Angular is built with TypeScript. The Angular CLI automatically installs the correct TypeScript version for your Angular version. Current Angular versions use:- TypeScript: 5.9.3 or later
You don’t need to install TypeScript separately. The Angular CLI manages TypeScript as a project dependency.
Update Angular CLI
To update the Angular CLI to the latest version:Troubleshooting
Permission errors on macOS/Linux
If you encounter permission errors during global installation, avoid usingsudo. Instead, configure npm to install global packages in your home directory:
~/.profile or ~/.bashrc file.
Clear cache
If you experience installation issues, clear the npm cache:Next steps
Now that Angular CLI is installed, you’re ready to create your first Angular application.Create your first app
Learn how to create and run your first Angular application
