I'm having trouble using jquery datatables with Aurelia. I'm trying to import datatables, but with no luck. When I try to initialize it, it gives me error
Unhandled promise rejection TypeError: $(...).dataTable is not a function(…)
My typescript code is following:
import * as $ from 'jquery';
import * as dataTable from 'datatables';
export class App {
router: Router;
constructor() {}
attached() {
$('#example').dataTable({
"paginate": true,
"pageLength": 25
});
}
activate() {
console.log("app.activate");
}....
Any pointers? Cheers :)
import $ from 'jquery'orimport 'jquery'and alsoimport 'datatables'- Matthew James Davis