TExcelTAD
Home › Angular › Angular Intro

Angular Introduction

Angular is a TypeScript framework from Google for building web applications that run in the browser. Instead of handing you a small library and leaving the architecture to you, Angular ships a complete toolbox: components, a template language, a router, forms, an HTTP client, dependency injection, a testing setup and a command-line tool that wires it all together.

Angular vs AngularJS

The name causes confusion, so let's clear it up first.

AngularJS (1.x) Angular (2+)
Released 2010 2016, new major version every ~6 months
Language JavaScript TypeScript
Building block Controllers and $scope Components
Status End of life since 2022 Actively developed

Everything in this course is about modern Angular — the current versions use standalone components, signals for reactive state and a built-in control flow syntax (@if, @for, @switch) directly in templates.

What does Angular code look like?

An Angular app is a tree of components. Each component is a TypeScript class plus an HTML template that describes what it shows. Here is a complete component:

angular · try it yourself
import { Component, signal } from '@angular/core';

@Component({
  selector: 'app-hello',
  template: `
    <h1>Hello, {{ name() }}!</h1>
    <p>You have {{ unread() }} unread messages.</p>
  `,
})
export class Hello {
  name = signal('Mai');
  unread = signal(3);
}

Three things stand out:

  1. The @Component decorator tells Angular this class is a component and gives it a selector (the custom HTML tag <app-hello>) and a template.
  2. {{ ... }} is interpolation — it inserts a value into the page.
  3. signal(...) creates a reactive value. When it changes, Angular updates exactly the parts of the page that read it.

Note: Angular itself cannot run inside this site's playground, so Angular examples show the code next to a preview of what the browser renders. Plain TypeScript examples (marked with a Run button) execute for real.

Why choose Angular?

Strength What it means for you
Batteries included Router, forms, HTTP and testing are official packages that work together
TypeScript first Type errors in your components and templates are caught at build time
Strong conventions Large teams can read each other's code because projects look alike
Signals Fine-grained reactivity without manual subscriptions
Long-term support Predictable release schedule and automated ng update migrations

Angular is popular for business applications, admin dashboards, banking and insurance portals, and any project where many developers maintain the same codebase for years.

TypeScript is the foundation

Angular code is TypeScript, so every class, interface and type annotation you already know applies. The examples below are pure TypeScript and run directly in your browser — a quick warm-up for the syntax you will see in every component:

ts · try it yourself
interface Course {
  title: string;
  lessons: number;
  free: boolean;
}

const course: Course = { title: 'Angular', lessons: 35, free: true };

function describe(c: Course): string {
  const price = c.free ? 'free' : 'paid';
  return `${c.title} has ${c.lessons} lessons and is ${price}.`;
}

console.log(describe(course));
Angular has 35 lessons and is free.

Classes with typed fields are the shape of every Angular component and service:

ts · try it yourself
class Counter {
  count = 0;

  increment(): void {
    this.count++;
  }
}

const counter = new Counter();
counter.increment();
counter.increment();
console.log(`Count is ${counter.count}`);
Count is 2

What you will learn

  • Angular Tutorial — components, templates, bindings, control flow, directives, pipes, signals, inputs/outputs and services.
  • Building Apps — routing, forms, HTTP, RxJS, change detection, lazy loading and styling.
  • Tooling — unit tests and production builds.
  • Practice — exercises and a small task-board project.

Tip: You only need basic HTML, CSS and JavaScript to start. If TypeScript is new to you, the type annotations in this course are kept simple and explained when they appear.

Test yourself

Which language is modern Angular written in?

  1. Dart
  2. TypeScript
  3. CoffeeScript
  4. Plain ES5 JavaScript

What does {{ name() }} do in an Angular template?

  1. Declares a variable
  2. Calls a server function
  3. Inserts the value of the name signal into the page
  4. Creates a comment

What is the building block of an Angular application?

  1. Controllers
  2. Components
  3. Scopes
  4. Widgets