angular.copy
ng
Creates a deep copy of source
, which should be an object or an array.
source
is not an object or array, source
is returned.Note: this function is used to augment the Object type in Angular expressions. See
ng.$filter
for more information about Angular arrays.
angular.copy(source[, destination]);
Param | Type | Details |
---|---|---|
source | * | The source that will be used to make a copy.
Can be any type, including primitives, |
destination (optional) | ObjectArray | Destination into which the source is copied. If
provided, must be of the same type as |
* | The copy or updated |