Angular and Its History
You search for an Angular answer and find two tutorials that look nothing alike. One is full of $scope and ng-controller; the other uses classes, decorators and signal(). Both say "Angular". Knowing the history lets you tell in five seconds which one is useful to you.
The rule
AngularJS is the old framework; Angular is its rewrite, not its upgrade.
AngularJS appeared in 2010 at Google. It was plain JavaScript, and it made HTML "smarter" with attributes like ng-model and ng-repeat. It became hugely popular, but large apps grew slow and hard to organise.
So the team started over. Angular (released in 2016 as "Angular 2") was written in TypeScript and built around components: small classes that each own a piece of the page. The name dropped the "JS" to mark the break. The two cannot be mixed in one file, and moving an app from one to the other means rewriting it. AngularJS reached the end of official support at the end of 2021.
Since then Angular ships a new major version about every six months, and recent versions changed how everyday code looks:
- Standalone components replaced the need for
NgModulewrappers. - Signals give a simple, fine-grained way to hold changing values.
- Built-in control flow (
@if,@for,@switch) replaced the older*ngIfand*ngForstyle for new code.
Here is the component this course keeps building, Greenhouse, an app that tracks house plants and when to water them:
import { Component, signal } from '@angular/core';
@Component({
selector: 'app-root',
template: `<h1>{{ title() }}</h1>`,
})
export class App {
title = signal('Greenhouse');
}