2

2 Examples

0
import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'
import Login from './Login.vue'
import Home from './Home.vue'
import Restricted from '/.Restricted.vue';

Vue.use(VueRouter);

const routes = [
    { path: '/', component: Login},
    {
        path: '/restricted',
        component: Restricted,
        children: [
           { path: 'home', component: Home},
        ],
    },        
];

const router = new VueRouter({
  routes,
  mode: 'history'
});

new Vue({
  el: '#app',
    router,
  render: h => h(App)
});
by on

0
 v-show="$route.path==='/auth/register' || $route.path==='/auth/login' ? true : false"
by on

Other Code Examples