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.
So I had an array of objects I wanted to submit as a hidden form field as a json object.
It was simple enough to write a quick directive to parse the array.
My "add object" function used .push() to add to the array, which caused my directive to not fire and the json string to not be updated.
This is because neither ngModel nor ngBind check for objectEquality in their watch functions. For ngModel, this should be made configurable, see e.g. #7203 and ngBind should probably work like interpolation in this respect, see issue #9717
So I had an array of objects I wanted to submit as a hidden form field as a json object.
It was simple enough to write a quick directive to parse the array.
My "add object" function used .push() to add to the array, which caused my directive to not fire and the json string to not be updated.
I reproduced the issue below.
http://jsfiddle.net/4eah5gqf/5/
Looks like this isn't just affecting the use ngModelController.$parsers or ngModelController.formatters. A regular ng-bind is also affected.
What I've resorted to is using concat. That seems to trigger the update I need.
The text was updated successfully, but these errors were encountered: