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

Commit 9f61e74

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 4059600 commit 9f61e74

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

0 commit comments

Comments
 (0)