Every time when I try to get data from Axios template its return data with all code and tag from Axios template.
<script src='assets/js/axios.min.js'></script>
<script src="assets/js/vue.js"></script>
<script src="assets/js/vue-router.js"></script>
<script>
const APP = new Vue({
el: '#app',
methods: {
showAllToDoList: function() {
axios.get('inc/user.php').then(function(response) {
alert(response.data);
});
},
},
created: function() {
this.showAllToDoList();
}
});
</script>
it's returned in alert like that. if I connect my database it shows all code like connection query everything.
<?php
echo "hi";