We have services.ts . Which needs 2 arguments
UPDATED seems like i was looking the error wrong. this method was causing the console error
private checkLink(row, options) {
if (options.type ==='link' || options.type ==='custom-method') {
if (options.type === 'link' || (options.type === 'custom-method' && (row.user_id === this.userData.id) || this.authService.permission('view_subject_data') || this.userData.id === row.section.user_id || this.userData.id === 1)) {
if (options.permission) {
if (this.authService.permission(options.permission)) {
this.router.navigate([`${options.link}/${row[options.linkKey]}`]);
}
} else {
this.router.navigate([`${options.link}/${row[options.linkKey]}`]);
}
}
}
}
Im calling it to my html table which is used by many components.
<span [innerHtml]="datatableService.setColumnData(row[column.prop], column.options, row)"
Here's the data that im passing to setColumnData
columns = [
{
name: 'User',
prop: 'last_name',
options: {
type: 'piped',
pipes: ['displayFullName']
},
},
{
name: 'Action',
prop: 'description'
},
{
name: 'Time',
prop: 'created_at',
options: {
type: 'piped',
pipes: ['formatDateTime']
},
},
];
Which gives me type undefined but code works. I just need to get rid of console.log error.
I know i just need to supply the needed arguments like this. And it works no errors.
{
name: 'Action',
prop: 'description',
options: ''
},
But the problem is i need to change all the similar columns variable all across the project. Is there anyway easier or clean way to do this?

optionsto mycolumnsarray. The error doesn't show. Like in the last part in my post.