From 73194009a9ecc64d7243c1bf5dd6248408fe32c6 Mon Sep 17 00:00:00 2001
From: Igor Minar
Date: Wed, 24 Nov 2010 17:32:04 -0800
Subject: docs for angular.Object.copy
---
src/Angular.js | 41 +++++++++++++++++++++++++++++++----------
1 file changed, 31 insertions(+), 10 deletions(-)
(limited to 'src/Angular.js')
diff --git a/src/Angular.js b/src/Angular.js
index 311be0ca..fb23e1f2 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -735,19 +735,40 @@ function isLeafNode (node) {
}
/**
- * Copies stuff.
+ * @workInProgress
+ * @ngdoc function
+ * @name angular.Object.copy
+ * @function
+ *
+ * @description
+ * Creates a deep copy of `source`.
*
- * If destination is not provided and source is an object or an array, a copy is created & returned,
- * otherwise the source is returned.
+ * If `destination` is not provided and `source` is an object or an array, a copy is created &
+ * returned, otherwise the `source` is returned.
+ *
+ * If `destination` is provided, all of its properties will be deleted.
+ *
+ * If `source` is an object or an array, all of its members will be copied into the `destination`
+ * object.
+ *
+ * Note: this function is used to augment the Object type in angular expressions. See
+ * {@link angular.Object} for more info.
*
- * If destination is provided, all of its properties will be deleted and if source is an object or
- * an array, all of its members will be copied into the destination object. Finally the destination
- * is returned just for kicks.
+ * @param {*} source The source to be used to make a copy.
+ * Can be any type including primitives, `null` and `undefined`.
+ * @param {(Object|Array)=} destination Optional destination into which the source is copied.
+ * @returns {*} The copy or updated `destination` if `destination` was specified.
*
- * @param {*} source The source to be used during copy.
- * Can be any type including primitives, null and undefined.
- * @param {(Object|Array)=} destination Optional destination into which the source is copied
- * @returns {*}
+ * @example
+ Salutation:
+ Name:
+
+
master={{master}}
+ form={{form}}
*/
function copy(source, destination){
if (!destination) {
--
cgit v1.2.3