aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Minar2010-11-24 21:03:56 -0800
committerIgor Minar2010-11-24 21:03:56 -0800
commit921f7ce49e63c80bbae4d59e65c0d85bb5256370 (patch)
treeabc541607655e126f6f5ffc8b5542d5442cefdc5
parent17eee57c522516ba139c05091fac200dfc353d36 (diff)
downloadangular.js-921f7ce49e63c80bbae4d59e65c0d85bb5256370.tar.bz2
docs for angular.extend
-rw-r--r--src/Angular.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 3637479c..3a7848e3 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -611,6 +611,19 @@ function formatError(arg) {
}
+/**
+ * @workInProgress
+ * @ngdoc function
+ * @name angular.extend
+ * @function
+ *
+ * @description
+ * Extends the destination object `dst` by copying all of the properties from the `src` objects to
+ * `dst`. You can specify multiple `src` objects.
+ *
+ * @param {Object} dst The destination object.
+ * @param {...Object} src The source object(s).
+ */
function extend(dst) {
foreach(arguments, function(obj){
if (obj !== dst) {
@@ -622,6 +635,7 @@ function extend(dst) {
return dst;
}
+
function inherit(parent, extra) {
return extend(new (extend(function(){}, {prototype:parent}))(), extra);
}
' href='#n140'>140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177