Javascript 如何使用angularjs使表列中的列可编辑?
使用angularjs时是否可以使tablecolumn可编辑?我有这张桌子:Javascript 如何使用angularjs使表列中的列可编辑?,javascript,angularjs,html,Javascript,Angularjs,Html,使用angularjs时是否可以使tablecolumn可编辑?我有这张桌子: <table> <thead> <tr class="header"> <th>id</th> <th>files</th> </tr> </thead> <tbody ng-repeat="person in persons">
<table>
<thead>
<tr class="header">
<th>id</th>
<th>files</th>
</tr>
</thead>
<tbody ng-repeat="person in persons">
<tr>
<td>{{person.id}}</td>
<td>{{person.fileNames)}}</td>
</tr>
</tbody>
</table>
我想让用户可以编辑第二列,这样他就可以更改/删除文件。我如何才能做到这一点 使用可编辑的内容
如果您使用的是gridOptions,则可以使用:enableCellEdit:true。在此处查看演示:或
["Koala.jpg","Tulips.jpg","Tulips.jpg","Hydrangeas.jpg","Lighthouse.jpg","Chrysanthemum.jpg"]
<table>
<thead>
<tr class="header">
<th>id</th>
<th>files</th>
</tr>
</thead>
<tbody ng-repeat="person in persons">
<tr>
<td contentEditable>{{person.id}}</td>
<td contentEditable>{{person.fileNames)}}</td>
</tr>
</tbody>
</table>