Install Angular and Create Your First App
Step-by-step setup using Angular CLI, then run your first Angular app locally.
Let’s set up Angular the clean way using Angular CLI. ## Step 1: Install Node.js Angular needs Node.js. Install the latest LTS from nodejs.org. Check versions: ```bash node -v npm -v ``` ## Step 2: Install Angular CLI ```bash npm install -g @angular/cli ng version ``` ## Step 3: Create a new Angular app ```bash ng new my-angular-app cd my-angular-app ng serve -o ``` - `ng serve` starts a local dev server - `-o` opens the browser automatically ## Common setup issues ### “ng is not recognized” Close and reopen your terminal, then try again. If still not, reinstall Node.js LTS and retry CLI install. ### Port already in use ```bash ng serve --port 4300 ``` ## What you should see You’ll see the default Angular starter page, running on: ``` http://localhost:4200 ``` > Next: Understand the project structure so you know where to code.