how to correctly bind the inputtext with that scenario?

Thanks in advance.

On Thursday, July 24, 2014 12:00:23 PM UTC+8, cjk wrote:
>
> I have a form with so many input controls. And I use ng-repeat to render 
> the controls.
> My problem now is how to declare for a valid ng-model.
>
>
> $scope.fields = [
>                   { label: "Name", fieldName: 'fldName'},
>                   { label: "Age", fieldName: 'fldAge'},
>                   { label: "Address", fieldName: 'fldAddress'}
>                ];
>
>
>
>
>  <table class="table table-condensed">
>      <tbody>
>          <tr ng-repeat="row in fields">
>              <td>{{row.label}}</td>
>               <td><input type="text" class="form-control" 
> data-ng-model="row.fieldName" /></td>
>           </tr>
>
>       </tbody>
> </table>
>
> * data-ng-model="row.fieldName" - displays the actual 'fldName' word.
>
>
>
>
> Thanks in advance.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to