Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/389.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用angularjs使表列中的列可编辑?_Javascript_Angularjs_Html - Fatal编程技术网

Javascript 如何使用angularjs使表列中的列可编辑?

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">

使用angularjs时是否可以使tablecolumn可编辑?我有这张桌子:

<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>