Introduction

AngularJS was Google's first attempt at a full front-end framework: two-way data binding, reusable components before "components" was the industry-standard word for them, and a way to extend plain HTML with new behavior. It shipped in 2010, well before React or Vue existed, and for years it was the default choice for building a dynamic web app.

Bootstrapping a page with ng-app

AngularJS attaches itself to a page through the ng-app directive. Anywhere inside the element carrying ng-app, AngularJS is watching for its own attributes and double-curly-brace expressions:

HTML index.html
<!DOCTYPE html>
<html ng-app="">
<head>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
</head>
<body>
  <p>1 + 1 = {{ 1 + 1 }}</p>
</body>
</html>
Rendered output
1 + 1 = 2

Loading the AngularJS script and marking one element with ng-app is all it takes to activate the framework. Once it's running, {{ 1 + 1 }} isn't literal text anymore — it's an AngularJS expression, evaluated and replaced with its result the moment the page loads.

A minimal two-way binding example

The feature AngularJS became known for is binding an input directly to a value shown elsewhere on the page, with no event listener code written by hand:

HTML greeting.html
<div ng-app="">
  <input ng-model="name" placeholder="Your name">
  <p>Hello, {{ name }}!</p>
</div>
Rendered behavior
Typing "Maya" into the input immediately updates the paragraph to:
Hello, Maya!
— with no JavaScript event handler written anywhere. ng-model links the input's
value to the "name" expression, and {{ name }} re-renders every time it changes.

ng-model="name" creates a variable called name on the current scope and keeps it in sync with the input's value on every keystroke. {{ name }} anywhere else in the same scope automatically reflects that value — this is the "two-way" part: the input updates the variable, and the variable's display updates in turn.

Why this course exists on a 2026 tutorial site: Google ended official support for AngularJS in January 2022, and no new project should start on it today — that's exactly what the modern Angular course on this site is for. But AngularJS shipped in an enormous number of enterprise applications during the mid-2010s, many of which are still running in production. Being able to read and safely modify that code is a real, employable skill, distinct from choosing to build something new with it.