What is Angular? The Framework Explained

Angular is Google's TypeScript framework for building web apps with components, signals and dependency injection. Learn how it works and how to test it.

What is Angular?

Angular is an open source, TypeScript-based framework from Google for building web applications, mostly single-page apps. It ships routing, forms, an HTTP client, dependency injection, testing tools and a CLI in one package, so a team makes fewer tooling choices than with a library such as React. Angular is not AngularJS, the older 1.x framework, which is a different codebase.

How Angular works

An Angular app is a tree of components. Each component pairs a TypeScript class with a template and styles. Components are standalone by default (this changed in version 19), so you list what a component uses in its imports array instead of declaring it in an NgModule. Services are plain classes that Angular's dependency injection hands to components that ask for them.

import { Component, signal, computed } from '@angular/core';

@Component({
  selector: 'app-cart',
  template: `
    @if (count() > 0) {
      <p>{{ count() }} items, total {{ total() }}</p>
    } @else {
      <p>Your cart is empty.</p>
    }
    <button (click)="add()">Add item</button>
  `,
})
export class Cart {
  count = signal(0);
  total = computed(() => this.count() * 9);
  add() { this.count.update(n => n + 1); }
}

Three modern pieces appear in that snippet:

  • Signals. signal() holds a value, computed() derives one from other signals, and effect() runs side effects when signals change. Angular tracks where each signal is read, so it can update only the parts of the page that depend on it.
  • Built-in control flow. @if, @for (with a track expression) and @switch replace the older *ngIf and *ngFor directives in templates.
  • Zoneless change detection. Per the Angular docs it is the default from version 21, so apps no longer depend on zone.js to know when to update.

Server-side rendering and hydration

Angular can render pages on the server (ng add @angular/ssr), prerender them at build time, or render them in the browser, chosen per route. Hydration then reuses the server-rendered HTML in the browser instead of rebuilding it, which helps avoid flicker and can improve Largest Contentful Paint. Angular also supports incremental hydration and event replay, which catches clicks that happen before hydration finishes. For background on the rendering model, see server-side rendering.

Versions and support

Angular 22 is the current major version (released 3 June 2026). Per the Angular release page, majors now ship every 12 months (every 6 months before version 22), and each major is supported for about 24 months: 12 of active support, then 12 of long-term support with security fixes only. Check angular.dev/reference/releases before you pick a version for a new project.

Angular vs React vs Vue

  • Angular: a full framework with strong conventions. Fits large teams and long-lived apps that benefit from one way of doing things.
  • React: a UI library. You pick routing, data fetching and state tools yourself.
  • Vue: a progressive framework with a smaller core and optional official libraries.

None of them is faster in every case. Bundle size, rendering strategy and your own code usually matter more than the framework name.

Common Angular mistakes

  • Missing track or a poor track key in @for. Angular then recreates DOM nodes more often than needed.
  • Using effect() to derive state. Use computed() for derived values and keep effects for side effects.
  • Unsubscribed RxJS streams. Long-lived subscriptions leak memory unless you use the async pipe or clean up on destroy.
  • Direct DOM manipulation in SSR apps. It can cause hydration mismatches because the server and client DOM must match.
  • Heavy initial bundles. Lazy-load routes and use @defer for below-the-fold content.

Testing and monitoring Angular apps

Most Angular load goes to the APIs behind the app, not to the Angular code itself, because the framework runs in the user's browser. Load test the backend your app calls with LoadFocus (JMeter and k6 from 25 cloud regions; the free plan includes up to 10 virtual users), and track real page performance with page speed monitoring. The blog post on load testing single-page applications covers the approach in depth.

FAQ: Angular Framework

Is Angular the same as AngularJS?

No. AngularJS is the 1.x framework from 2010. Angular (version 2 and later) is a complete rewrite in TypeScript with a component architecture. When people say Angular today, they mean the modern framework.

Do I need TypeScript to use Angular?

In practice yes. Angular is written in TypeScript, its tooling and documentation assume it, and the CLI generates TypeScript projects.

What is the difference between standalone components and NgModules?

A standalone component declares its own dependencies in its imports array. With NgModules, components were declared in a module that listed what they could use. Components are standalone by default from version 19, and older NgModule code still works.

What are signals in Angular?

Signals are wrapper objects around a value that notify Angular when it changes, so only the parts of the page that read the signal are updated. You create them with signal(), derive values with computed() and run side effects with effect().

Can Angular do server-side rendering?

Yes. Add it with ng add @angular/ssr, then choose server rendering, prerendering or browser rendering per route. Hydration lets the browser reuse the server-rendered HTML.

Should I learn Angular or React?

It depends on the job you want. Both are widely used. Angular suits teams that want a complete framework with conventions, React suits teams that prefer to assemble their own stack. Check the job listings in your area.

How fast is your website?

Elevate its speed and SEO seamlessly with our Free Speed Test.

Free Website Speed Test

Analyze your website's load speed and improve its performance with our free page speed checker.