I have property fields that contains string array:
in controller I have:
$scope.data = {};
$scope.fields = [
"new0.name",
"new0.type",
"new0.address",
"new0.city",
"new0.postalCode"
];
in view I have:
<div class="control-group" ng-repeat="f in fields">
<label class="control-label">Some field name</label>
<div class="controls">
<input type="text" name="{{f}}" ng-model="data.f" class="input-xlarge">
</div>
</div>
In the ng-repeat, how can I concatenate value of f to the ng-model to get, for example ng-model="data.new0.name"?
data[f]