December 2014
Intermediate to advanced
346 pages
6h 14m
English
Equality watches register a listener that uses angular.equals() as the comparator, which exhaustively examines the entirety of all objects to ensure that their respective object hierarchies are identical. Both a new object assignment and property modification will register as a change and invoke the watch callback.
This watcher should be used when any modification to an object is considered as a change event, such as a user object having its properties at various depths modified.
The equality comparator is used when the optional Boolean third argument is set to true. Other than that, these watchers are syntactically identical to reference comparator watchers, as shown here:
$scope.myObj ...
Read now
Unlock full access