I'm trying to do a editable cell with angularJS. I managed to do one editable, but when i edit the value dont change in the controller.
I'm using this.
<table md-table>
<thead fix-head md-head md-order="query.order">
<tr md-row>
<th md-column style="box-sizing: content-box"><span>Item</span></th>
<th md-column style="box-sizing: content-box"><span>Coluna do Excel</span></th>
<th md-column style="box-sizing: content-box"><span>Status</span></th>
</tr>
</thead>
<tbody md-body>
<tr md-row ng-repeat="layout in vm.carregarLayoutTeste | filter: filter.search | orderBy: query.order">
<td md-cell>{{layout.Nome}}</td>
<td>
<input type="text" value="{{layout.Coluna}}" ng-readonly='!($index == eEditable)' ng-dblclick="eEditable = $index"/>
</td>
<td md-cell>{{layout.Status ? "OK":"Verifique a Coluna Correta"}}</td>
</tr>
</tbody>
</table>
And in the js i'm using this.
$scope.eEditable = -1; //-1 by default. It doesn't match any $index from ng-repeat
But when i send information to the controller the information of the cell its the same in the begging. Example:
The cell 1 has valuea TESTE, i edit and change to NEW, when it reaches the controller its still teste, someone know what can i do?