docs: update angular.extend() documentation

How to preserve original objects similar to jQuery.extend().

Closes #9087
This commit is contained in:
Warlock
2014-09-15 13:03:35 +04:00
committed by Igor Minar
parent e07ebded23
commit 4568bc037d

View File

@@ -334,6 +334,9 @@ function setHashKey(obj, h) {
* Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
* to `dst`. You can specify multiple `src` objects.
*
* You can specify multiple `src` objects. If you want to preserve original objects, you can do so
* by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.
*
* @param {Object} dst Destination object.
* @param {...Object} src Source object(s).
* @returns {Object} Reference to `dst`.