Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

vue-breadcrumbs component opened wrong page #26

Open
PetroGromovo opened this issue Oct 14, 2019 · 0 comments
Open

vue-breadcrumbs component opened wrong page #26

PetroGromovo opened this issue Oct 14, 2019 · 0 comments

Comments

@PetroGromovo
Copy link

Hello,
In my Laravel 5.8 / vuejs 2.6 app I need to use breadcrumbs and I installed
vue-breadcrumbs pligin

and from its example description I see that I must to adjust all routes in resources/js/routes.js which
I want to use in breadcrumbs, so I wrote :

import Home from './components/BS4/Home.vue';
import ForumsList from './components/BS4/forum/ForumsList.vue';
...
export const routes = [

    // FRONTEND PAGES BLOCK START

    {
        path: '/',
        component: Home,
        meta: {
            breadcrumb: 'Home Page',
            requiresAuth: false
        },
        name: 'HomePage',

        children: [
            {
                path: '/forums-list',
                component: ForumsList,
                meta: {
                    breadcrumb: 'Forums',
                    requiresAuth: false
                },
                name: 'ForumsList',
                children: [
                    {
                        path: '/forum/:slug',
                        component: ForumView,
                        meta: {
                            breadcrumb: 'Forum View',
                            requiresAuth: false
                        },
                        name: 'ForumView',
                        children: [
                            {
                                path: '/forum-thread/:slug',
                                component: ForumThreadView,
                                meta: {
                                    breadcrumb: 'Forum Thread',
                                    requiresAuth: false
                                },
                                name: 'ForumThreadView'
                            },

                        ]
                    },
                ]
            },

        ],


    },

    // FRONTEND PAGES BLOCK END


// BACKEND CRUD PAGES BLOCK START
    {
        path: '/admin/dashboard',
        component: DashboardContainer,
        meta: {
            requiresAuth: true,
            authGroupsAccess: ['Admin', 'Manager'],
        },
        name: 'DashboardIndex'
    },

But it does not work as I expect:
clicking on "/forums-list" link with browser url changed I see content in breadcrumbs is changed to “Home Page"/"Forums”
but in browser home page is opened. Has my routes systax error?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant