I need to add checkbox in Angular 4 typescript we are using ng2-table.
//code for ng-table in html
<ng-table (tableChanged)="onChangeTable(config)"
(cellClicked)="onCellClick($event)"
[rows]="rows" [columns]="columns">
</ng-table>
//to create checkbox I am adding html in component where filling the data.
data.forEach((item: any) =>
{item.CheckBox = '<input type="checkbox"></input>';
//cell click event in table component is getting triggered
public onCellClick(data: any): any {
this event is getting triggered
....
}
Please help. Thanks you.
Where is your data binded to the table? Where is the template for the checkbox? Can you re-create your problem in a stackblitz repo?
By the way, there is a thread about checkboxes in the official repo issues