multiple pages in Vue.js CLI

后端 未结 5 636
温柔的废话
温柔的废话 2020-12-04 06:45

I\'m having trouble figuring out how to have multiple pages in a Vue CLI project. Right now I have my home page with a few components and I want to create another page but I

5条回答
  •  温柔的废话
    2020-12-04 07:01

    One easy solution

    1. Update your backend sever to either GET and/or POST
    2. axios.get/post(to_the_url)
    3. Serve back the html (like render_template in flask)
    4. You can extract the url from response.request.responseURL
    5. Now set window.location.href = response.request.responseURL

提交回复
热议问题