Skip to the content.

Angular > 🧑‍💻 Exercise 03


🚀 Your First Angular App

Getting Started with Your First Angular App in 4 simple steps

🛠️ Prerequisites


📦 Step 1: Install Angular CLI

The Angular CLI helps scaffold and manage Angular apps with ease.

npm install -g @angular/cli

To check if it installed correctly:

ng version

✨ Step 2: Create a New Angular Project

Use the CLI to create a new project (replace my-first-app with your preferred name):

ng new my-first-app

During Setup:

This will install dependencies and scaffold the app.


🚀 Step 3: Run the Angular App (Development Server)

Navigate to the project folder:

cd my-first-app

Start the development server:

ng serve

Open your browser and visit:

http://localhost:4200

You should see the default Angular welcome page.


🧩 Step 4: Change the Default Page Content

  1. Open your project in VS Code or any code editor.

  2. Navigate to:

src/app/app.component.html
  1. Replace the contents with:
<h1>Welcome to My First Angular App!</h1>
<p>This is a custom homepage 🎉</p>