I need to create the name of a model dynamically, but at the time of creating the angle obj does not accept that I try to create the obj name dynamically. Has anyone done this or do you know how to proceed?
The problem is occurring in the data-ng-model, I wanted to create an object named form with all its attributes dynamically.
The HTML example below
<div data-ng-repeat="campos in lista">
<div data-ng-switch="campo.type">
<div data-ng-switch-when="text">
<label data-ng-if="campo.label">{{campo.label}}</label>
<input type="text" name="{{campo.name}}" placeholder="{{campo.placeholder}}" data-ng-model="form.{{campo.name}}" />
</div>
</div>
</div>