mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-19 08:00:23 +00:00
docs(angular.copy): clarify corner cases
The behaviour when null or undefined was passed was not clear. The exception thrown when source == destination was not documented. Closes #3946
This commit is contained in:
parent
e4415d21d3
commit
ce351e69b1
1 changed files with 2 additions and 1 deletions
|
|
@ -598,7 +598,8 @@ function isLeafNode (node) {
|
|||
* * If no destination is supplied, a copy of the object or array is created.
|
||||
* * If a destination is provided, all of its elements (for array) or properties (for objects)
|
||||
* are deleted and then all elements/properties from the source are copied to it.
|
||||
* * If `source` is not an object or array, `source` is returned.
|
||||
* * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
|
||||
* * If `source` is identical to 'destination' an exception will be thrown.
|
||||
*
|
||||
* Note: this function is used to augment the Object type in Angular expressions. See
|
||||
* {@link ng.$filter} for more information about Angular arrays.
|
||||
|
|
|
|||
Loading…
Reference in a new issue