Chapter 8Using AngularJS

If manipulating the DOM is like driving a stick shift, then using jQuery is like driving an automatic. That would make using AngularJS like taking a cab—it’s declarative: you tell it what to do and the framework synthesizes code to manipulate the DOM. The benefit is you write a lot less code to interact with the users and call services. But that doesn’t diminish the need for automated testing. You still want to verify that your code does what’s intended.

AngularJS is an opinionated framework—good automated testing is one of its opinions. Unlike tools that suggest testing is good, AngularJS goes the extra mile to make code actually testable. This is largely achieved by how AngularJS weaves different parts of ...

Get Test-Driving JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.