Express.js Won't Render in Post Action

前端 未结 1 955
悲哀的现实
悲哀的现实 2020-12-12 01:52

Node.js is kinda new, so I hardly can find things in internet. I have already solved this. It was because I was calling from client side using $.ajax. But when

相关标签:
1条回答
  • 2020-12-12 02:01

    I successfully solved it by myself! I found out that it happened because I call the route from $.ajax from the client. When I change the calling method by putting this code into the form and remove the $.ajax, it's done. Thank you @mscdex

    form(role="form" method="POST")
    

    and I changed the route /contact/sendEmail to just /contact.

    0 讨论(0)
提交回复
热议问题