angular/angular.js — pull request #1478 by vojtajina (2012-10-19 20:12:47+00:00)
Title: refactor($rootScope): allow partial $digest within $apply

$apply() was calling $digest() on $rootScope using closure variable, which makes it hard to override. Now it calls it on this.$root, which means people can override the $root property on a scope in order to make $apply $digest only part of the app.

This is useful for stuff like dialogs, where you can set the dialogs scope to be $root and therefore any subsequent $apply() will $digest only the dialog, without the rest of the universe.