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.
- [Vuejs]-How can I access Vuex Store from Node.js?
- [Vuejs]-Getting parent json data in child level loop. (Laravel Vue js)
Source:stackexchange.com