My Smart Table of Angular如下所示 -
<table id="smartTbl" st-table="displayedCollection" st-safe-src="data.computerList" class="table table-striped">
表格的行显示为
<tbody>
<tr id="{{ row.id }}" ng-repeat="row in displayedCollection">
<td><input type="text" value='{{ row.id }}' ng-readonly="!isEnabled" ng-class="{ disabled: !isEnabled }" class="ng-scope ng-pristine ng-valid"></td>
<td><input type="text" value='{{ row.computerName }}' ng-readonly="!isEnabled" ng-class="{ disabled: !isEnabled }" class="ng-scope ng-pristine ng-valid"></td>
</tr>
<td>
<button class="btn btn-success glyphicon glyphicon-floppy-saved" id='EditSave' data-text="Save" ng-hide="hideSave" ng-click="hideEdit = true;hideSave = false;isEnabled = true; editComputer(row, row.id)" ng-init="hideSave = true;isEnabled = false"></button></td>
</tbody>
我还允许在智能表中添加新/编辑行,但在这些操作中,我无法检索用户输入值的值,因为我呈现页面value='{{ row.id }}' ng-readonly="!isEnabled"
有关如何检索输入字段值的任何建议吗?
我不想使用contenteditable&amp; ng-model似乎不适用于输入字段,因为我像我一样呈现输入数据