can't compile variable from Component (Angular2) to dataTables column
can't compile variable from Component (Angular2) to dataTables column
Hi! I am totally exhausted looking for answer, so I'm asking for help now.
the issue is that I cant integrate variable 'testMe' from Component to dataTables. ( such {{testMe}} doest render)
Here is a part of code
MyComponent
...
export class MyComponent implements OnInit {constructor(private myService: MyService) { }
testMe:any = 'some value'; // here is my value
}
- MyService
...
dtOptions = {
dom: 'Brptip',
columns = [
{
title: 'Document',
data: 'ticket',
render: (val, type, row, meta) => {
return <span>{{testMe}}</span>
// -- that is a place that doesn't work! I expect here to be 'some value' instead {{testMe}}
}
},
...
]
}
Looking forward for your help!