【发布时间】:2020-02-26 23:55:43
【问题描述】:
当我尝试用 Angular 编写这段 javascript 代码时,我错过了什么?
ngOnInit() {
$('#jithesh').DataTable( {
columnDefs: [ {
orderable: false,
className: 'select-checkbox',
targets: 0
} ],
select: {
style: 'os',
selector: 'td:first-child'
},
order: [[ 1, 'asc' ]]
} );
这是原始的java脚本
$(document).ready(function() {
$('#example').DataTable( {
columnDefs: [ {
orderable: false,
className: 'select-checkbox',
targets: 0
} ],
select: {
style: 'os',
selector: 'td:first-child'
},
order: [[ 1, 'asc' ]]
} );
} );
试图遵循这个例子中的内容
https://datatables.net/extensions/select/examples/initialisation/checkbox.html
【问题讨论】:
标签: javascript angular