October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Set Up Angular Locally: Install, Create, and Run a Project

Install Angular CLI, generate a starter workspace, and launch your first Angular app locally with a supported Node.js version.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To set up Angular locally, install a Node.js version supported by your Angular release, install Angular CLI, create a project with ng new, and run it with the development server. A successful start prints a local address—usually http://localhost:4200/—where you can open the app in a browser.

What you need before installing Angular

  • Node.js: Angular CLI uses Node.js to run its tools. Angular’s current installation page lists Node.js v22.22.3 or newer; its local setup guide describes the requirement as an active LTS or maintenance LTS release. Since supported versions depend on the Angular release, check Angular’s current installation and compatibility guidance before choosing a Node.js version.
  • A terminal and text editor: These are needed to run commands and edit files. Angular recommends Visual Studio Code and Angular Language Service, but they are workflow recommendations, not Angular prerequisites. The first-app tutorial also names WebStorm as an editor option.

You can use npm, pnpm, yarn, or bun with Angular’s setup instructions. The CLI defaults to npm. If you only want to explore Angular without installing a local workspace, Angular provides an online playground and tutorial through its CLI overview.

As an Amazon Associate I earn from qualifying purchases.

Install Angular CLI

Open a terminal and install the CLI globally with npm:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm install -g @angular/cli

The package is @angular/cli; its command-line interface is ng. The CLI creates and manages Angular workspaces and applications.

If the global install fails, the cause may be platform-specific permissions. Angular notes that PowerShell’s execution policy can affect npm global scripts on Windows, while global script permissions or ownership may cause issues on Unix-like systems. Don’t change an execution policy or use elevated privileges automatically; first understand the implications of the change and follow the relevant platform guidance in Angular’s setup instructions.

Create a workspace and starter app

In the terminal, navigate to the parent directory where you want the project, then run:

ng new my-app

Run ng new outside an existing Angular workspace. The CLI creates a workspace directory named my-app, generates its initial application, and installs the required packages. It may ask about options such as routing; for a basic first project, accepting the defaults is a reasonable choice. See the ng new command reference for options including package manager selection, skipping dependency installation or Git initialization, and creating an empty workspace.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start the development server

Move into the generated project directory and start Angular’s local development server:

cd my-app
ng serve --open

The server watches the project files and rebuilds as you make changes. When it reports that it is ready, open the displayed local address; Angular’s guide gives http://localhost:4200/ as the default. The installation guide also shows npm start as a way to start the project.

Find the files you will edit

The starter application’s source files are in src/. A workspace can hold more than one application or library; additional generated applications and libraries go under projects/ by default. Angular’s file structure reference explains the usual layout.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to create an empty workspace

For a single beginner project, the regular ng new my-app flow creates the workspace and first application together. For a workspace intended to hold multiple apps, create an empty workspace first, then generate applications inside it:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ng new my-workspace --no-create-application
cd my-workspace
ng generate application app-one

Workspace operations such as ng generate should be run from inside the workspace. Angular documents the empty-workspace option and application generation in its ng new reference and workspace file structure guide.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.