From 921f7ce49e63c80bbae4d59e65c0d85bb5256370 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 24 Nov 2010 21:03:56 -0800 Subject: docs for angular.extend --- src/Angular.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Angular.js') 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); } -- cgit v1.2.3