-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Filters starting with "_" shouldn't be considered private #4842
Comments
+1 - CouchDB uses a convention where each document id and revision is prefixed with an underscore. Example: {
_id: "myDocumentId",
_rev: "myDocumentRevision"
} This addition of underscore-as-private makes it impossible to use ngResource and CouchDB. |
This "error" should be something people do in best practice, and not something that causes your application to fail. Javascript allows me to name my variables anything; don't force your private member variable naming convention on me. How was this not put in any of the release candidates, as this is a code-breaking change? |
@krotscheck this would affect MongoDB users aswell |
+1 it seems like rc3 files were removed from bower as well so we can't go back |
I was able to go back to "angular": "1.2.0-rc.3" |
ahh you're right my resolves were not pointing where i expected |
This is most stupid change I've seen in 1.2. MongoDB and CouchDB use "_id" fields and a few REST APIs that I use allow to embed linked data and return it in an "_embedded" property, to name a few examples of why this should either be reverted alltogether or given a way to be disabled. |
See #4509 for the main discussion |
how to repro this issue: use couch or mongo with angular. the outright ridiculousness of this breaking change is beyond belief, i feel we are just being trolled. |
@goya Actually, the problem I've reported is different from the one you guys are reporting. |
+1 this is a big problem with mongoDB. need to use RC3 until this is fixed or all my apps break. |
+1 ditto with MongoDB. |
fixed in 1.2.1 by #4926 which just added some more bloat. |
Hiding `_*` properties was a feature primarily for developers using Closure compiler and Google JS style. We didn't realize how many people will be affected by this change. We might introduce this feature in the future, probably under a config option, but it needs more research and so I'm reverting the change for now. This reverts commit 3d6a89e. Closes angular#4926 Closes angular#4842 Closes angular#4865 Closes angular#4859 Closes angular#4849 Conflicts: src/ng/parse.js
Hiding `_*` properties was a feature primarily for developers using Closure compiler and Google JS style. We didn't realize how many people will be affected by this change. We might introduce this feature in the future, probably under a config option, but it needs more research and so I'm reverting the change for now. This reverts commit 3d6a89e. Closes angular#4926 Closes angular#4842 Closes angular#4865 Closes angular#4859 Closes angular#4849 Conflicts: src/ng/parse.js
Hey,
I've registered Underscore methods as filters, prefixing them with a
_
. Somewhat like this.When I had my app running 1.2.0rc3, everything was fine, but today after updating to 1.2.0 they started to throw exceptions telling that I can't access private properties. I'm aware of this change as of 1.2.0, but I don't think filters should follow the same rule.
What could be done about this, any tip/workaround...?
The text was updated successfully, but these errors were encountered: