//practice.vue文件
this.$http.get('praxises.json').then((response) => {
alert('成功');
}, (response) => {
alert("出错");
});
chrome浏览器报错:GET http://localhost:8080/praxise... 404 (Not Found)
但我已经把json文件放在文件目录里了。请问该怎么解决?
放在目录里并不意味能通过http访问。要么另起web服务serve这个目录,要么放在static目录里,因为dev-server对该目录文件实现了http访问。
https://github.com/vuejs-temp...