mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-08 22:37:20 +08:00
docs: update angular.extend() documentation
How to preserve original objects similar to jQuery.extend(). Closes #9087
This commit is contained in:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user