#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Angular · Beginner Tutorial

Angular Basics Explained in Plain Simple Language

A beginner-friendly guide to Angular — components, templates, data binding, directives, services, and routing explained in plain simple language with practical examples.

Tracks
Angular Basics · Live Interactive
Concept
—
What it is
Purpose
—
Why you use it
Example
—
Simple usage
Template → Class → Component → App
Click a concept to see how it works. Angular is a framework for building web apps — it's like LEGO for the web.

Home / Tutorials / Frontend / Angular Basics Explained in Plain Simple Language

Angular · Beginner Tutorial

Angular Basics Explained in Plain Simple Language

COMPONENT TEMPLATE SERVICE ROUTING Component Class + Template The building block @Component Template HTML + Angular syntax What the user sees {{ data }} Service Shared logic & data Reusable across app @Injectable Routing Navigate pages SPA navigation Router
Angular's four core building blocks — Components, Templates, Services, and Routing — work together to build modern web apps.

Quick summary — Angular basics in plain language

Angular is a framework for building web applications. Think of it as a toolbox that gives you everything you need — components, templates, data binding, directives, services, and routing — to build fast, modern apps.

In this guide you will learn:

  1. Components — the building blocks of an Angular app.
  2. Templates & Data Binding — how the HTML talks to the code.
  3. Directives — instructions that change how the page behaves.
  4. Services & Dependency Injection — shared logic and data.
  5. Routing — navigating between pages.

SECTION 01What is Angular?

Angular is a JavaScript framework (written in TypeScript) for building web applications. It gives you a structured way to build apps — like LEGO blocks for the web. Instead of writing everything from scratch, you use Angular's building blocks to build faster and cleaner.

Concept Plain English Real-World Analogy Why It Matters
Framework A toolbox with rules and helpers Like a pre-built kitchen You build faster
TypeScript JavaScript with extra safety Like spell-check for code Fewer bugs
SPA Single Page Application Like a mobile app in the browser Fast, smooth experience
CLI Command Line Interface Like a remote control for your project Create files in seconds
# Install Angular CLI globally
npm install -g @angular/cli

# Create a new project
ng new my-app

# Go into the project
cd my-app

# Start the development server
ng serve

# Open http://localhost:4200
angular-setup.sh
Key insight: Angular is a complete framework — it gives you routing, forms, HTTP, and testing out of the box. You don't need to stitch together many libraries.

SECTION 02Components — The Building Blocks

A component is the basic building block of an Angular app. It's a piece of the UI — like a button, a card, or a whole page. Each component has two parts:

  • Class — the logic (data and functions) written in TypeScript.
  • Template — the HTML that tells Angular what to show.
Week Concept What You Do Goal
Week 1 Create Components Create a header component and a footer component Understand @Component
Week 2 Reuse Components Use one component multiple times in the app Learn how components nest
Week 3 Component Inputs Pass data into a component using @Input Make components reusable
Week 4 Component Outputs Emit events from a component using @Output Make components interactive
import { Component } from '@angular/core';

@Component({
  selector: 'app-card',
  template: `
    <div class="card">
      <h2>{{ title }}</h2>
      <p>{{ body }}</p>
    </div>
  `,
  styles: [`
    .card { border: 1px solid #ddd; padding: 16px; border-radius: 8px; }
  `]
})
export class CardComponent {
  title = 'My Card';
  body = 'This is a simple card component.';
}
card.component.ts
Key insight: Components make your code clean and reusable — build small pieces and compose them into a whole app.

SECTION 03Templates & Data Binding

Templates are HTML files that tell Angular what to show. Data binding is how the template and the component class talk to each other. There are four kinds:

Type Syntax Direction Example
Interpolation {{ value }} Class → Template {{ name }}
Property Binding [property]="value" Class → Template [src]="imageUrl"
Event Binding (event)="handler()" Template → Class (click)="save()"
Two-Way Binding [(ngModel)]="name" Both ways [(ngModel)]="username"
<h1>Hello, {{ name }}!</h1>
<p>You are {{ age }} years old.</p>

// In the component:
export class AppComponent {
  name = 'Angular Learner';
  age = 25;
}
binding-examples.html
Key insight: Data binding keeps the UI and the class in sync. Interpolation is for showing data, property binding for setting HTML properties, event binding for responding to clicks, and two-way binding for form inputs.

SECTION 04Directives

Directives are instructions that tell Angular to do something with the DOM — like show or hide an element, repeat it, or style it. There are three types:

  • Component directives — the components you already use.
  • Structural directives — change the layout (ngIf, ngFor, ngSwitch).
  • Attribute directives — change appearance or behavior (ngClass, ngStyle).
<div *ngIf="isLoggedIn; else loggedOut">
  Welcome back!
</div>

<ng-template #loggedOut>
  Please log in.
</ng-template>
directives.html
Key insight: Directives let you build dynamic UIs — show or hide things based on conditions, loop through lists, and style elements on the fly.

SECTION 05Services & Dependency Injection

Services are classes that hold shared logic and data. They are used to share code between components — like fetching data from an API, logging, or authentication. Dependency injection (DI) is how Angular gives a component a service it needs.

import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class DataService {
  private items = ['Angular', 'React', 'Vue'];

  getItems() {
    return this.items;
  }

  addItem(item: string) {
    this.items.push(item);
  }
}
data.service.ts
Key insight: Services keep your components lean and focused on the UI. Dependency injection makes services easy to share and test.

SECTION 06Routing

Routing lets you navigate between different pages in a single-page app. Angular's Router maps URLs to components, so when you click a link, the URL changes and a different component is shown — without reloading the page.

import { Routes } from '@angular/router';
import { HomeComponent } from './home.component';
import { AboutComponent } from './about.component';

export const routes: Routes = [
  { path: '', component: HomeComponent },
  { path: 'about', component: AboutComponent },
  { path: '**', redirectTo: '' }
];
app.routes.ts
Key insight: Routing makes your app feel like a real multi-page site — but it's still a single page under the hood. Fast and smooth.

SECTION 07Test yourself — Angular basics quiz

Five questions. No sign-up.

0 / 5

Pick an answer to see why it is right or wrong.

SECTION 08Frequently asked questions

What is the most important concept in Angular?

Components are the most important — they are the building blocks of every Angular app. Once you understand components, everything else falls into place.

Do I need to know TypeScript before Angular?

It helps, but you can learn TypeScript along the way. Angular uses TypeScript, so you'll pick it up naturally as you build components and services.

What is the difference between Angular and AngularJS?

Angular (2+) is a complete rewrite of AngularJS (1.x). Angular uses TypeScript, a component-based architecture, and is significantly faster and more modern.

Can I use Angular for small projects?

Yes — Angular is great for projects of all sizes. For very small projects, it may be overkill, but its structure helps as the project grows.

How long does it take to learn Angular basics?

With consistent practice, you can learn the basics in 2-4 weeks. Building a small project — like a to-do app — is the fastest way to learn.

Classroom & online · Noida

Ready to build with Angular?

Our Data Analytics Training Course is designed to help you recover and rebuild — with skills, projects, and interview prep that get you hired.

₹15,500 · full programme ₹24,000
  • Complete Angular roadmap
  • Skills & projects
  • Mock interviews
  • Weekday & weekend batches