Sending form without reloading the page
Kacperell opened this issue · comments
Hi! I have form on my website. I use preventDefault(), so I don’t overload the page.
e.preventDefault();
axios
.post(this.action)
.then(res => { …
Without router ajax query returns me data from my node.js server and I can make changes on the website. On the server it looks like this res.json(data)
;
And this date is my response to Axios.
But when I use highway.js it’s different. Res.json() render pure site with json data. I can’t understand why. I check it in firefox network monitor normally is status 200 POST Cause XHR. But when I use router Cause is : document .