JSFiddle: http://jsfiddle.net/L8m7ptm7/
I am working with an array of objects that hold questions to be incorporated into an Angular form:
$scope.questions = [
{
'name': 'question1',
'label': 'Question 1',
'value': null
},
{
'name': 'question2',
'label': 'Question 2',
'value': null
}
];
The questions display correctly in the DOM, with the expected `name` attributes as 'question1' and 'question2'.
The issue arises when trying to extract these field values from the `myForm` object. If you run the fiddle, you'll notice what happens. Rather than the form having keys for `question1` and `question2`, it only has a single key - `{{question.name}}`.
Is there a way to make these fields register with the form object using the intended (rendered) names?