A from-scratch reimplementation of the AngularJS (1.x) framework, built to understand how it works internally — following Tero Parviainen's book Build Your Own AngularJS.
Note: This is a learning project from 2016. AngularJS reached end-of-life in January 2022. It's kept here as a reference and a record of the notes below — not for production use.
The NOTEBOOK/ folder contains my detailed study notes (PDF) written while
building each part.
Part 1 — Scopes (PDF)
- Scopes and digest
- Scope inheritance
- Watching collections
- Scope events
Part 2 — Expressions and filters
- 2.1 — literal expressions; lookup and function-call expressions
- 2.2 — operator expressions; filters
- 2.3 — expressions and watches
Part 3 — Modules and dependency injection (PDF) 10. Modules and the injector 11. Providers 12. High-level DI features
Part 4 — Utilities (PDF)
13. Promises
14. $http
Part 5 — Directives
- 5.1 — DOM compilation and basic directives; directive attributes; directive linking and scopes
- 5.2 — controllers; directive templates; directive transclusion
- 5.3 — interpolation; bootstrapping Angular
src/— the framework sourcetest/— unit tests (Karma)sample_application/— a small app built with mark-angular; open the HTML page in a browsermarkangular.js/markangular.min.js— prebuilt bundles (Browserify + UglifyJS)
npm install
npm test # run the Karma test suite