Angular Get Started
Here is a simple and practical “Angular Get Started” guide—perfect for beginners who want to start coding quickly 👇
🚀 Angular – Get Started (Step-by-Step)
1️⃣ Install Node.js
Angular requires Node.js.
Download & install from: https://nodejs.org
After installation, check the version:
2️⃣ Install Angular CLI
Angular CLI helps you create and manage Angular projects easily.
Run:
Check installation:
3️⃣ Create Your First Angular Project
Use Angular CLI:
CLI will ask:
-
Add routing? (y/n)
-
CSS styling? (choose CSS / SCSS etc.)
Enter:
4️⃣ Run the Application
Go into your project folder:
Open your browser → http://localhost:4200
You will see the default Angular welcome page 🎉
🧱 Understanding the Basic Structure
Inside src/app you will see:
🧩 Create a New Component
Example: create a home component.
Run:
OR shorter:
Angular will create:
Then use the component in HTML:
🔗 Working with APIs (Simple Example)
Add HttpClient Module in app.module.ts:
Use it in a service:
🔄 Two-Way Binding Example
app.component.html:
Enable FormsModule:
⭐ Routing Setup
When creating project, if you chose “Yes” for routing, you will see app-routing.module.ts.
Example route:
Use in nav:
🎯 You Are Now Ready With Angular!
You have learned:
-
Install Angular CLI
-
Create a project
-
Run the app
-
Create components
-
Setup routing
-
Use data binding & API calls
