Skip to content

Commit c67b1bc

Browse files
committed
docs(angular.merge): add notes about support and lodash compatibility
Closes angular#16187 Closes angular#14512
1 parent 3814b70 commit c67b1bc

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/Angular.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ function extend(dst) {
396396
* sinceVersion="1.6.5"
397397
* This function is deprecated, but will not be removed in the 1.x lifecycle.
398398
* There are edge cases (see {@link angular.merge#known-issues known issues}) that are not
399-
* supported by this function. We suggest
400-
* using [lodash's merge()](https://lodash.com/docs/4.17.4#merge) instead.
399+
* supported by this function. We suggest using another, similar library for all-purpose merging,
400+
* such as [lodash's merge()](https://lodash.com/docs/4.17.4#merge).
401401
*
402402
* @knownIssue
403403
* This is a list of (known) object types that are not handled correctly by this function:
@@ -406,6 +406,8 @@ function extend(dst) {
406406
* - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient)
407407
* - AngularJS {@link $rootScope.Scope scopes};
408408
*
409+
* `angular.merge` also does not support merging objects with circular references.
410+
*
409411
* @param {Object} dst Destination object.
410412
* @param {...Object} src Source object(s).
411413
* @returns {Object} Reference to `dst`.
@@ -806,8 +808,10 @@ function arrayRemove(array, value) {
806808
* </div>
807809
*
808810
* @knownIssue
809-
* This is a non-exhaustive list of object types / features that are not handled correctly by this
810-
* function:
811+
* This is a non-exhaustive list of object types / features that are not handled correctly by
812+
* `angular.copy`. Note that since this functions is used by the change detection code, this
813+
* means binding or watching objects of these types (or that include these types) might not work
814+
* correctly.
811815
* - [`ImageData`](https://developer.mozilla.org/docs/Web/API/File)
812816
* - [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)
813817
* - [`ImageData`](https://developer.mozilla.org/docs/Web/API/ImageData)

src/ngParseExt/module.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*
1010
* @knownIssue
1111
* You cannot use Unicode characters for variable names in the {@link ngRepeat} or {@link ngOptions}
12-
* expressions (e.g. `ng-repeat="f in поля"`), because they don't use the {@link `$parse`} service
13-
* to parse the expression.
12+
* expressions (e.g. `ng-repeat="f in поля"`), because even with `ngParseExt` included, these
13+
* special expressions are not parsed by the {@link `$parse`} service.
1414
*
1515
* @description
1616
*

0 commit comments

Comments
 (0)