angular/angular.js — pull request #2413 by petebacondarwin (2013-04-16 11:40:50+00:00)
Title: fix(ngClass): should remove class when object is the same but property has changed

If you wire up ngClass directly to an object on the scope, e.g. `ng-class="myClasses"`,
where `scope.myClasses = { 'classA': true, 'classB': false }`,
there was a bug that changing `scope.myClasses.classA = false`, was not being picked
up and classA was not being removed from the element's CSS classes.

This fix uses `angular.equals` for the comparison and ensures that oldVal is a copy of
(rather than a reference to) the newVal.