Я использую DataTables на Angular7.У меня есть функция JS на файл .ts.И я получаю сообщение об ошибке «this.title is not function».
код в моем файле просмотра выглядит следующим образом:
$(document).ready(function () {
$('#example').DataTable({
...
initComplete: function () {
const that = this;
that.api().columns().every(function (index) {
var e;
switch (this.title()) {
case "Description":
e = $('<input type="text" class="form-control form-control-sm form-filter m-input" data-col-index="'
+ this.index() + '"/>');
break;
}
});
}
});
});