A namespace for utility functions used to work with JavaScript objects. These functions are exposed in two ways:
* Angular expressions: Functions are bound to all objects and augment the Object type. The
names of these methods are prefixed with the '$' character in order to minimize naming collisions.
To call a method, invoke the function without the first argument, e.g, myObject.$foo(param2)
.
* JavaScript code: Functions don't augment the Object type and must be invoked as functions of
angular.Object
as angular.Object.foo(myObject, param2)
.
angular.Object.copy()
- Creates a deep copy of the source parameterangular.Object.equals()
- Determines if two objects or values are
equivalentangular.Object.size()
- Determines the number of elements in
strings, arrays, and objects.