From c0d6e9ea383fc3a2a426a6227a2dd758946d3977 Mon Sep 17 00:00:00 2001 From: Warlock Date: Mon, 15 Sep 2014 13:03:35 +0400 Subject: [PATCH] update angular.extend() documentation How to preserve original objects similar to jQuery.extend(). --- src/Angular.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Angular.js b/src/Angular.js index 1b1d1b5eb0b7..bea5dae51e89 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -328,7 +328,8 @@ function setHashKey(obj, h) { * * @description * Extends the destination object `dst` by copying all of the properties from the `src` object(s) - * to `dst`. You can specify multiple `src` objects. + * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, + * you can do so by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`. * * @param {Object} dst Destination object. * @param {...Object} src Source object(s).