Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/388.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 向ng网格添加自定义指令_Javascript_Angularjs_Ng Grid - Fatal编程技术网

Javascript 向ng网格添加自定义指令

Javascript 向ng网格添加自定义指令,javascript,angularjs,ng-grid,Javascript,Angularjs,Ng Grid,我可以向ng网格的输入单元格添加自定义指令吗有人能帮我吗,我搜索了它,但找不到任何帮助的感谢 这是ng网格的参考 https://angular-ui.github.io/ui-grid/ 您可以尝试使用以下方法: { 字段:“名称”, cellClass:'nameCell', headerClass:“nameHeader”, editableCellTemplate:“”+ '' + '' + '' + '' } { field: 'name', cellClass:

我可以向ng网格的输入单元格添加自定义指令吗有人能帮我吗,我搜索了它,但找不到任何帮助的感谢

这是ng网格的参考

https://angular-ui.github.io/ui-grid/
您可以尝试使用以下方法:

{
字段:“名称”,
cellClass:'nameCell',
headerClass:“nameHeader”,
editableCellTemplate:“”+
'' +
'' +
'' +
''
}
{
    field: 'name',
    cellClass: 'nameCell',
    headerClass: 'nameHeader',
    editableCellTemplate: '<div your-custom-directive>' +
    '<form name="inputForm">' +
    '<input type="number" ng-class="\'colt\' + col.uid" ui-grid-editor ng-model="MODEL_COL_FIELD">' +
    '</form>' +
    '</div>'
}