Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 76515d1

Browse files
wesleychoNarretz
authored andcommitted
docs($rootScope): add note about watching File objects
- Add note recommending against watching `File` objects with deep watchers Closes #15440
1 parent c317433 commit 76515d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ng/rootScope.js

+2
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ function $RootScopeProvider() {
296296
* according to the {@link angular.equals} function. To save the value of the object for
297297
* later comparison, the {@link angular.copy} function is used. This therefore means that
298298
* watching complex objects will have adverse memory and performance implications.
299+
* - This should not be used to watch for changes in objects that are
300+
* or contain [File](https://developer.mozilla.org/docs/Web/API/File) objects due to limitations with {@link angular.copy `angular.copy`}.
299301
* - The watch `listener` may change the model, which may trigger other `listener`s to fire.
300302
* This is achieved by rerunning the watchers until no changes are detected. The rerun
301303
* iteration limit is 10 to prevent an infinite loop deadlock.

0 commit comments

Comments
 (0)