[Vuejs]-No Data Available Datatables

0👍

Try this instead

async mounted(){
 axios.get("https://www.reddit.com/r/technology/new.json")
 .then( (res) => { 
    this.tableData =  res.data.data.children;
    console.log(this.tableData);
    $('.myDataTable').DataTable();
});

The problem is that you use $(document).ready() when the document is already loaded. So this part won’t be executed.

Leave a comment