You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ng-repeat behavior inconsistency with js objects #1430
In each case, the behavior is different, and none of those cases work for me for direct editing of javascript object properties (like a dictionary/hash).
I could be missing something, but if I'm not, I think there should be a note in the documentation about the different behaviors and possibly the best options for certain use cases.
I am hitting this particular problem myself. The way to avoid it is to use complex objects as values in the object. But this is hacky. I would love to see this fixed.
The problems in case 2 & 3 are to do with JavaScript. Primitive types are passed by value and so the inner scope has no way of knowing that it should update the value on the outer scope.
The last case is fixed in this PR: #1661. You should probably track that to see if it gets into master at some point!
Activity
gleber commentedon Oct 2, 2012
I am hitting this particular problem myself. The way to avoid it is to use complex objects as values in the object. But this is hacky. I would love to see this fixed.
petebacondarwin commentedon Dec 6, 2012
The problems in case 2 & 3 are to do with JavaScript. Primitive types are passed by value and so the inner scope has no way of knowing that it should update the value on the outer scope.
The last case is fixed in this PR: #1661. You should probably track that to see if it gets into master at some point!
SteveShaffer commentedon Dec 7, 2012
Cool. Thanks Pete.
darkyen commentedon Jul 28, 2014
This saved me half a day of work :-)