Creating Your First Angular App

Creating Your First Angular App

✅ Prerequisites

Make sure you have:

  • Node.js installed (node -v)
  • Angular CLI installed (ng version)

If not, install with:

npm install -g @angular/cli

๐Ÿš€ Step-by-Step: Create Your Angular App

๐Ÿ”ง Step 1: Create the App

Run this command in your terminal:

ng new my-first-app

You’ll be prompted with:

  • Would you like to add Angular routing? → Type Yes or No
  • Which stylesheet format would you like to use? → Choose CSS (or SCSS, etc.)

This will generate a new folder my-first-app with the full Angular project structure.

๐Ÿ“‚ Step 2: Navigate to the Project

cd my-first-app

๐Ÿงช Step 3: Serve the Application

ng serve

By default, the app runs on http://localhost:4200. Open your browser and go to:

http://localhost:4200

You should see the default Angular Welcome page! ๐ŸŽ‰

๐Ÿ› ️ Project Structure Overview

Folder / File Purpose
src/app/ Your app's main code (components, services, etc.)
src/app/app.component.ts Main component logic
src/app/app.component.html Main view (HTML)
angular.json Angular project configuration
package.json Project dependencies
node_modules/ Installed packages
main.ts Entry point for bootstrapping the app

๐ŸŽฏ What Next?

  • Create your first component: ng generate component my-component
  • Add routing
  • Fetch data from an API
  • Style your app with Angular Material or Bootstrap

Comments

Popular posts from this blog

Car Wash System vb.net

Face recognition using EmguCV 3.0 and typing pattern recognition

Student Information System - AngularJS , ASP.NET API, C#