I'm trying to set up an ember binding between a controller and a model. The controller is part of an array (see question Ember.js views (unlimited number)), and so I'm trying to set up the binding to an element in a the model (an ArrayProxy) with the same index as the index of the controller itself.
The binding works if I link it to a non-indexed element of the ArrayProxy, but not if I try set an element of the array. So, if I set up the binding like:
answerBinding: 'App.SurveyData.test'
and in App.SurveyData set 'test' to be a string, say "StackOverlow", the two way binding is set up correctly. If I set up a binding like
answerBinding: 'App.SurveyData.content'
where content is an array, I can view in the console that 'answer' has a value of 'Array[2]' and each element equals 'Test object' as expected
When I try to set up the answerBinding as
answerBinding: 'App.SurveyData.content[0]'
which is trying to link answer to the first element in SurveyData as required, I can view in the console that 'answer' has a value of undefined.
Code is at http://jsfiddle.net/reubenposthuma/dyLGG/1/
Any thoughts would be appreciated