3
<div ng-controller="TestController">
<div class="col-md-6 col-md-offset-2">
<table class="table table-bordered">
<tr ng-repeat="column in columns track by $index" >
<td>{{ column }}</td>
<td><input type="text" ng-model="size[$index]" class="form-control"/></td>
</tr>
</table>
</div>
<div ng-repeat="column in columns track by $index">
-> <span ng-bind="size[$index]"></span> <br/>
</div>
</div>
Javascript:
var app = angular.module('app',[]);
app.controller('TestController',function($scope, $http){
$scope.columns = ['nome1','nome2','nome3'];
});
I would like to bind the information while I typed in the text input (always referencing the field I typed to span
which will show the information), but did not notice the way I did.