Vue
Introduction to Vue.js: Routing

History Mode

PRO
Outline

By default, the vue router is in what we call hash mode, which essentially means hash mode is on, and history mode is off. With history mode off, we get this hash symbol in the URL. This hash simulates a full URL so that the page won't be reloaded when the URL changes. I'll show you how to change this (it's pretty easy!) in the video, and go over some additional explanation.

One caveat, is that since history mode assumes server side rendering, your form submissions might cause some unwanted behavior by refreshing the page automatically. You can change this by using v-on:submit.prevent in your form to stop page refreshes.

 

I finished! On to the next chapter