API Documentation • Docs
API Documentation / START_LOCATION
Variable: START_LOCATION
const
START_LOCATION:RouteLocationNormalizedLoaded
Initial route location where the router is. Can be used in navigation guards to differentiate the initial navigation.
Example
js
import { START_LOCATION } from 'vue-router'
router.beforeEach((to, from) => {
if (from === START_LOCATION) {
// initial navigation
}
})