Roadmap › 4. Frontend › Step 47
A1

AngularJS (1.x) — Legacy

Modules, controllers, $scope, two-way data binding, directives, filters, services/factories/providers, dependency injection, digest cycle, routing, $http and promises, custom directives, components, performance and migration to Angular.
Quick revision for interview day. Print it or save it as a PDF.

Building blocks

module · controller (controller-as vm) · $scope / $rootScope · directives · components (1.5+) · filters · services · DI · routing · digest cycle.

Directives

ng-app · ng-controller · ng-model · ng-bind · ng-repeat (track by) · ng-if · ng-show/hide · ng-switch · ng-class · ng-click · ng-submit · ng-options · ng-include · ng-cloak · ng-messages.

Services

constant (config-safe) · value · factory (returns object) · service (new) · provider ($get, configurable).

Bindings

@ string · < one-way · = two-way · & callback. Component hooks: $onInit, $onChanges, $doCheck, $postLink, $onDestroy.

Digest

watchers + dirty checking · $apply (outside AngularJS) · $applyAsync · $watch / $watchCollection / deep watch · max 10 iterations · $emit up / $broadcast down / $on.

Key facts

1.0 2012 · 1.5 components · 1.6 removed .success/.error · 1.8.3 last · EOL 31 Dec 2021 · migrate with ngUpgrade.

Performance

:: one-time binding · track by · fewer watchers · debounce ng-model · no heavy template filters · debugInfoEnabled(false).