From b92c650e056bc3e445fdbe6f355d115338ecca2f Mon Sep 17 00:00:00 2001 From: Uri Goldshtein Date: Fri, 27 Sep 2013 16:07:54 +0300 Subject: docs(angular.copy): add an example with the two possible arguments Closes #4179 --- src/Angular.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/Angular.js b/src/Angular.js index b438270c..2cd3cc94 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -589,6 +589,42 @@ function isLeafNode (node) { * @param {(Object|Array)=} destination Destination into which the source is copied. If * provided, must be of the same type as `source`. * @returns {*} The copy or updated `destination`, if `destination` was specified. + * + * @example + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + +
+
*/ function copy(source, destination){ if (isWindow(source) || isScope(source)) throw Error("Can't copy Window or Scope"); -- cgit v1.2.3