Navigation Guards
Navigation Guards: means that before reaching a route to a component, its runs guard in advance which will redirect to or cancel routing. Example: product.js route file import Vue from 'vue' import VueRouter from 'vue-router' Vue . use ( VueRouter ) const vigo = { template: `<div> <h2>Hello vigo</h2> </div>` } const navBar = { template: `<div> <ul> <li><router-link v-bind:to="{ path:'list' }">Product all</router-link></li> </ul> </div>` } const setting = { template: ` <div> <navBar /> <router-view /> <router-view name='status' /> <router-view name='detail' /> </div>` , components: { navBar } } ...