I tried the solutions inside this issue 72 but it still does not work.
But when I try to unload the require.min.js file everything work very well
I am sorry to say this Tabler waste my time
Any news about this please?
Download datatables, link the js files to your requirejs config:
Add datatables to your assets/js/app.js
require.config({
shim: {
'bootstrap': ['jquery'],
'sparkline': ['jquery'],
'tablesorter': ['jquery'],
'vector-map': ['jquery'],
'vector-map-de': ['vector-map', 'jquery'],
'vector-map-world': ['vector-map', 'jquery'],
'core': ['bootstrap', 'jquery'],
'datatable': ['jquery', 'datatables'],
},
paths: {
'core': 'assets/js/core',
'jquery': 'assets/js/vendors/jquery-3.2.1.min',
'bootstrap': 'assets/js/vendors/bootstrap.bundle.min',
'sparkline': 'assets/js/vendors/jquery.sparkline.min',
'selectize': 'assets/js/vendors/selectize.min',
'tablesorter': 'assets/js/vendors/jquery.tablesorter.min',
'vector-map': 'assets/js/vendors/jquery-jvectormap-2.0.3.min',
'vector-map-de': 'assets/js/vendors/jquery-jvectormap-de-merc',
'vector-map-world': 'assets/js/vendors/jquery-jvectormap-world-mill',
'circle-progress': 'assets/js/vendors/circle-progress.min',
'datatables': 'assets/js/vendors/datatables',
}
});
In your page where you want to render a datatable:
<script>
require(['datatables'], function() {
$(document).ready(function () {
$('#table').DataTable({
});
});
});
</script>
Most helpful comment
Download datatables, link the js files to your requirejs config:
Add datatables to your
assets/js/app.jsIn your page where you want to render a datatable: