Vue.js Tips
Removing the #
from the URL
Issue: When using Vue.js to build a project, the URL may contain a #
, which affects the overall appearance.
Solution:
- In your project, perform a global search for the
const router = new VueRouter({})
function. - Inside the function, add the statement:
mode: 'history'
References and Acknowledgments
Original: https://wiki-power.com/ This post is protected by CC BY-NC-SA 4.0 agreement, should be reproduced with attribution.
This post is translated using ChatGPT, please feedback if any omissions.