Skip to content

Development Environment 🛠️

Let’s set up your development environment to build modern Angular applications with the latest features, tools, and best practices. This guide ensures you have everything needed for our comprehensive Angular tutorial.

  • Node.js 18+ installed
  • Angular CLI installed globally
  • Code editor with Angular extensions
  • Git configured
  • Browser with Angular DevTools

Angular requires Node.js for development. Install the latest LTS version:

Terminal window
# Check your Node.js version
node --version
# Should output v18.0.0 or higher

Installation:

  • Windows/Mac: Download from nodejs.org
  • Linux: Use your package manager or Node Version Manager (nvm)

The Angular CLI is essential for creating and managing Angular projects:

Terminal window
# Install Angular CLI globally
npm install -g @angular/cli
# Check version
ng version
# Should show Angular CLI 17+ for latest features

Choose your preferred package manager:

Terminal window
# npm (comes with Node.js)
npm --version
# Or yarn (optional)
npm install -g yarn
yarn --version
# Or pnpm (fastest)
npm install -g pnpm
pnpm --version

Download from code.visualstudio.com

Essential Extensions:

{
"recommendations": [
"angular.ng-template",
"ms-vscode.vscode-typescript-next",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"formulahendry.auto-rename-tag",
"ms-vscode.vscode-json"
]
}

VS Code Settings for Angular:

{
"typescript.preferences.importModuleSpecifier": "relative",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"typescript.suggest.autoImports": true,
"angular.experimental-ivy": true
}
  • WebStorm: Full-featured IDE with excellent Angular support
  • Sublime Text: Lightweight with Angular packages
  • Vim/Neovim: With coc-angular or similar plugins

Install Angular DevTools extension:

Terminal window
# Configure Git (if not already done)
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# Verify configuration
git config --list

Windows:

  • Windows Terminal (recommended)
  • PowerShell 7+
  • Git Bash

Mac:

  • iTerm2 (recommended)
  • Built-in Terminal
  • Oh My Zsh for enhanced experience

Linux:

  • Your distribution’s default terminal
  • Terminator or Tilix for advanced features

Let’s create a test project to verify everything works:

Terminal window
# Create a new Angular project
ng new angular-test-app --routing=true --style=scss --package-manager=npm
# Navigate to the project
cd angular-test-app
# Start the development server
ng serve
# Open browser to http://localhost:4200

You should see the Angular welcome page! 🎉

Install useful schematics for faster development:

Terminal window
# Angular Material
ng add @angular/material
# PWA support
ng add @angular/pwa
# Angular Elements
ng add @angular/elements

Useful global packages for Angular development:

Terminal window
# Angular DevKit
npm install -g @angular-devkit/schematics-cli
# TypeScript compiler
npm install -g typescript
# Prettier for code formatting
npm install -g prettier
# ESLint for code quality
npm install -g eslint
Terminal window
# Bundle analyzer
npm install -g webpack-bundle-analyzer
# Lighthouse CLI
npm install -g lighthouse
# Angular CLI analytics (optional)
ng analytics on

Node.js version conflicts:

Terminal window
# Use Node Version Manager (nvm)
nvm install 18
nvm use 18

Angular CLI installation issues:

Terminal window
# Clear npm cache
npm cache clean --force
# Reinstall Angular CLI
npm uninstall -g @angular/cli
npm install -g @angular/cli@latest

Permission errors (Mac/Linux):

Terminal window
# Fix npm permissions
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
Terminal window
# Check all versions
node --version
npm --version
ng version
git --version
# Test Angular CLI
ng help
ng new --help

For mobile app development with Ionic:

Terminal window
# Install Ionic CLI
npm install -g @ionic/cli
# Verify installation
ionic --version

For containerized development:

# Dockerfile for Angular development
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 4200
CMD ["ng", "serve", "--host", "0.0.0.0"]

Congratulations! Your development environment is now ready for modern Angular development with all the latest tools and best practices.

Now that your environment is ready, choose your learning path:

  1. Learning Path Guide - Plan your 20-week journey
  2. What is Angular? - Start with Angular fundamentals
  3. Angular Architecture - Understand how Angular works
  1. Learning Path Guide - Choose your focus areas
  2. Modern Angular Features - Jump to latest features
  3. Advanced Topics - Deep dive into complex patterns

If you encounter any setup issues:


Ready to become an Angular expert? Let’s start your journey with the Learning Path Guide to plan your route to mastery! 🚀