This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
docs($rootScope): add note about watching File objects #15440
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Narretz
suggested changes
Nov 27, 2016
@@ -296,7 +296,7 @@ function $RootScopeProvider() { | |||
* - When `objectEquality == true`, inequality of the `watchExpression` is determined | |||
* according to the {@link angular.equals} function. To save the value of the object for | |||
* later comparison, the {@link angular.copy} function is used. This therefore means that | |||
* watching complex objects will have adverse memory and performance implications. | |||
* watching complex objects will have adverse memory and performance implications. This should not be used to watch for objects that are or contain `File` objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should go into its own bullet point, with an explanation why it's not recommended.
Or if it is not recommended because file objects use a lot of memory, then this should also be pointed out.
- Add note recommending against watching `File` objects with deep watchers
wesleycho
force-pushed
the
docs/watch-note
branch
from
November 27, 2016 16:49
1cb7d6c
to
cbaa480
Compare
Updated as per request |
Narretz
suggested changes
Nov 27, 2016
@@ -297,6 +297,8 @@ function $RootScopeProvider() { | |||
* according to the {@link angular.equals} function. To save the value of the object for | |||
* later comparison, the {@link angular.copy} function is used. This therefore means that | |||
* watching complex objects will have adverse memory and performance implications. | |||
* - This should not be used to watch for changes in objects that are | |||
* or contain `File` objects due to limitations with `angular.copy`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a link to angular.copy?
Thanks @wesleycho, I've added the link myself. I didn't close the other issue because we should probably add docs to angular.copy itself, maybe a knownIssue for all types that are currently unsupported |
Narretz
pushed a commit
that referenced
this pull request
Nov 28, 2016
- Add note recommending against watching `File` objects with deep watchers Closes #15440
ellimist
pushed a commit
to ellimist/angular.js
that referenced
this pull request
Mar 15, 2017
- Add note recommending against watching `File` objects with deep watchers Closes angular#15440
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
File
objects with deep watchersThis should address #14352