Skip to content

vue-router / START_LOCATION

START_LOCATION

ts
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
  }
})

Released under the MIT License.