r/angularjs • • Nov 15 '13

AngularJS 1.2.1 (underscore-empathy) released, reverts hidden private fields.

https://github.com/angular/angular.js/blob/master/CHANGELOG.md
20 Upvotes

11 comments sorted by

3

u/reflectiveSingleton Nov 15 '13

I am glad this was done...a breaking change should not have been introduced in an RC release.

3

u/[deleted] Nov 15 '13

I agree on the breaking change, but I feel this is an important feature to have in some way. The only other way to create private fields is through a local var on the controller, which is not really feasible if that data needs to be used on the objects in the controller.

Say you have some object passed up to the front end that has an ID you don't want the view to touch, but you need to pass it back to the back end for reference on save. Creating a local var is a pain because you have to manually add it to the request data rather than just passing the object.

I feel they could fix the breaking change by making those properties read only to the view, rather than being inaccessible entirely.

2

u/reflectiveSingleton Nov 15 '13

I completely agree...it's just the fact that it was an RC it was done in, that I didn't agree with.

2

u/zdwolfe1 Nov 15 '13

The debates were so.. One sided. Glad they relented.

3

u/MojoGaga Nov 15 '13

"No one complained when it was implemented between releases. That must mean they were OK with it, and is not all related to the fact that very few people tested it."

"It seems like everyone is complaining because only people with issues will post on the GitHub issues. I bet everyone else loves it. You guys should just deal with it and modify all of your code to accomodate."

2

u/zdwolfe1 Nov 15 '13

Who said this?

2

u/MojoGaga Nov 15 '13

Sorry, that was my sarcastic (and admittedly exaggerated) interpretation of portions of the main GitHub thread. Didn't mean to imply that they were direct quotes.

This change was discussed in public on this thread for weeks before being merged.

Along with:

I wouldn't confuse the handful of those who are loudly opposing this change with unanimity. I think the main reason for the vocal opposition is that the benefits are clearly more subtle than the drawbacks.

combined with repeated workaround suggestions.

1

u/zdwolfe1 Nov 15 '13

Ahh. Gotcha

1

u/sittingaround Nov 16 '13

for weeks

How do they even think a few weeks of discussion is sufficient? Three weeks of discussion for breaking changes? Might as well be three hours.

2

u/plus-13 Nov 15 '13

Well the problem was this actually skipped the Release candidates to appear directly into the final 1.2.0

2

u/reflectiveSingleton Nov 15 '13

I suppose I misread what happened... IMO that is even worse than doing it in an RC though...